* [PATCH 1/1] neighbour: Support broadcast ARP in neighbor PROPE state
@ 2015-02-05 7:20 zhuyj
2015-02-05 12:12 ` Sergei Shtylyov
2015-02-07 6:46 ` Cong Wang
0 siblings, 2 replies; 3+ messages in thread
From: zhuyj @ 2015-02-05 7:20 UTC (permalink / raw)
To: netdev, stefan.costandache, alexandre.dietsch, yue.tao,
clinton.slabbert
Cc: eulfsam, David S. Miller, WANG Cong, zhuyj
From: eulfsam <ulf.samuelsson@ericsson.com>
When the neighbor statemachine is in PROBE state, it will normally send
a number of unicast ARP requests (number defined in "ucast_probes" entry
in the proc file system, default=3) and if no reply is received, it will
change state to FAILED.
Enabling CONFIG_ARP_PROBE_BCAST, will make the statemachine try to send
broadcast ARP requests, and only enter FAILED state if the broadcast ARP
requests did not receive a reply.
Enabling CONFIG_ARP_PROBE_BCAST, makes the IPv4 ARP behaviour more
similar to the IPv6 Neighbor Discovery protocol, and is neccessary,
if the other end only responds to broadcast ARPs.
CC: David S. Miller <davem@davemloft.net>
CC: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: eulfsam <ulf.samuelsson@ericsson.com>
Signed-off-by: zhuyj <zyjzyj2000@gmail.com>
---
net/core/neighbour.c | 4 ++++
net/ipv4/Kconfig | 17 +++++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 8d614c9..50f5ee2 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -830,10 +830,14 @@ out:
static __inline__ int neigh_max_probes(struct neighbour *n)
{
struct neigh_parms *p = n->parms;
+#ifdef CONFIG_ARP_PROBE_BCAST
+ return p->ucast_probes + p->app_probes + p->mcast_probes;
+#else
int max_probes = NEIGH_VAR(p, UCAST_PROBES) + NEIGH_VAR(p, APP_PROBES);
if (!(n->nud_state & NUD_PROBE))
max_probes += NEIGH_VAR(p, MCAST_PROBES);
return max_probes;
+#endif
}
static void neigh_invalidate(struct neighbour *neigh)
diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
index bd29016..4d13edb 100644
--- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig
@@ -259,6 +259,23 @@ config IP_PIMSM_V2
gated-5). This routing protocol is not used widely, so say N unless
you want to play with it.
+config ARP_PROBE_BCAST
+ bool "IP: ARP send broadcast ARP, if probing using unicast fails"
+ default y
+ ---help---
+ When the neighbor statemachine is in PROBE state, it will
+ normally send a number of unicast ARP requests
+ (number defined in "ucast_probes" entry in the proc file system, default=3)
+ and if no reply is received, it will change state to FAILED.
+
+ Saying Y here, will make the statemachine try to send broadcast ARP
+ requests, and only enter FAILED state if the broadcast ARP requests did not
+ receive a reply.
+
+ Enabling this, makes the IPv4 ARP behaviour more similar to the IPv6
+ Neighbor Discovery protocol, and is neccessary, if the other end
+ only responds to broadcast ARPs.
+
config SYN_COOKIES
bool "IP: TCP syncookie support"
---help---
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] neighbour: Support broadcast ARP in neighbor PROPE state
2015-02-05 7:20 [PATCH 1/1] neighbour: Support broadcast ARP in neighbor PROPE state zhuyj
@ 2015-02-05 12:12 ` Sergei Shtylyov
2015-02-07 6:46 ` Cong Wang
1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2015-02-05 12:12 UTC (permalink / raw)
To: zhuyj, netdev, stefan.costandache, alexandre.dietsch, yue.tao,
clinton.slabbert
Cc: eulfsam, David S. Miller, WANG Cong
Hello.
On 2/5/2015 10:20 AM, zhuyj wrote:
> From: eulfsam <ulf.samuelsson@ericsson.com>
> When the neighbor statemachine is in PROBE state, it will normally send
State machine.
> a number of unicast ARP requests (number defined in "ucast_probes" entry
> in the proc file system, default=3) and if no reply is received, it will
> change state to FAILED.
> Enabling CONFIG_ARP_PROBE_BCAST, will make the statemachine try to send
Likewise.
> broadcast ARP requests, and only enter FAILED state if the broadcast ARP
> requests did not receive a reply.
> Enabling CONFIG_ARP_PROBE_BCAST, makes the IPv4 ARP behaviour more
> similar to the IPv6 Neighbor Discovery protocol, and is neccessary,
Necessary.
> if the other end only responds to broadcast ARPs.
> CC: David S. Miller <davem@davemloft.net>
> CC: WANG Cong <xiyou.wangcong@gmail.com>
> Signed-off-by: eulfsam <ulf.samuelsson@ericsson.com>
> Signed-off-by: zhuyj <zyjzyj2000@gmail.com>
Need real names here.
[...]
> diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
> index bd29016..4d13edb 100644
> --- a/net/ipv4/Kconfig
> +++ b/net/ipv4/Kconfig
> @@ -259,6 +259,23 @@ config IP_PIMSM_V2
> gated-5). This routing protocol is not used widely, so say N unless
> you want to play with it.
>
> +config ARP_PROBE_BCAST
> + bool "IP: ARP send broadcast ARP, if probing using unicast fails"
> + default y
> + ---help---
> + When the neighbor statemachine is in PROBE state, it will
State machine.
> + normally send a number of unicast ARP requests
> + (number defined in "ucast_probes" entry in the proc file system, default=3)
> + and if no reply is received, it will change state to FAILED.
> +
> + Saying Y here, will make the statemachine try to send broadcast ARP
Likewise.
> + requests, and only enter FAILED state if the broadcast ARP requests did not
> + receive a reply.
> +
> + Enabling this, makes the IPv4 ARP behaviour more similar to the IPv6
> + Neighbor Discovery protocol, and is neccessary, if the other end
Necessary.
[...]
WBR, Sergei
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] neighbour: Support broadcast ARP in neighbor PROPE state
2015-02-05 7:20 [PATCH 1/1] neighbour: Support broadcast ARP in neighbor PROPE state zhuyj
2015-02-05 12:12 ` Sergei Shtylyov
@ 2015-02-07 6:46 ` Cong Wang
1 sibling, 0 replies; 3+ messages in thread
From: Cong Wang @ 2015-02-07 6:46 UTC (permalink / raw)
To: zhuyj
Cc: Linux Kernel Network Developers, stefan.costandache,
alexandre.dietsch, yue.tao, clinton.slabbert, eulfsam,
David S. Miller
On Wed, Feb 4, 2015 at 11:20 PM, zhuyj <zyjzyj2000@gmail.com> wrote:
> diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
> index bd29016..4d13edb 100644
> --- a/net/ipv4/Kconfig
> +++ b/net/ipv4/Kconfig
> @@ -259,6 +259,23 @@ config IP_PIMSM_V2
> gated-5). This routing protocol is not used widely, so say N unless
> you want to play with it.
>
> +config ARP_PROBE_BCAST
> + bool "IP: ARP send broadcast ARP, if probing using unicast fails"
> + default y
Why make it default to y? Since we use the current behavior for a long time?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-07 6:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-05 7:20 [PATCH 1/1] neighbour: Support broadcast ARP in neighbor PROPE state zhuyj
2015-02-05 12:12 ` Sergei Shtylyov
2015-02-07 6:46 ` Cong Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).