[PATCH v2] net: neigh: disallow transition to NUD_STALE if lladdr is unchanged in neigh_update()

2016-07-26 Thread Chunhui He
fer to resolve lladdr, when we can't get confirmation, even while remote packets try to set NUD_STALE state. Signed-off-by: Chunhui He <hchun...@mail.ustc.edu.cn> --- v2: - change title from "net: neigh: disallow state transition DELAY->STALE in neigh_update()" - remove &q

[PATCH v2] net: neigh: disallow transition to NUD_STALE if lladdr is unchanged in neigh_update()

2016-07-26 Thread Chunhui He
fer to resolve lladdr, when we can't get confirmation, even while remote packets try to set NUD_STALE state. Signed-off-by: Chunhui He --- v2: - change title from "net: neigh: disallow state transition DELAY->STALE in neigh_update()" - remove "NUD_CONNECTED" condi

Re: [PATCH] net: neigh: disallow state transition DELAY->STALE in neigh_update()

2016-07-25 Thread Chunhui He
Hi, On Mon, 25 Jul 2016 14:20:29 +0900, YOSHIFUJI Hideaki/吉藤英明 <hideaki.yoshif...@miraclelinux.com> wrote: > Hi, > > Chunhui He wrote: >> Hi, >> >> On Fri, 22 Jul 2016 10:20:01 +0300 (EEST), Julian Anastasov <j...@ssi.bg> >> wrote: >>>

Re: [PATCH] net: neigh: disallow state transition DELAY->STALE in neigh_update()

2016-07-25 Thread Chunhui He
Hi, On Mon, 25 Jul 2016 14:20:29 +0900, YOSHIFUJI Hideaki/吉藤英明 wrote: > Hi, > > Chunhui He wrote: >> Hi, >> >> On Fri, 22 Jul 2016 10:20:01 +0300 (EEST), Julian Anastasov >> wrote: >>> >>> Hello, >>> >>> On Thu,

Re: [PATCH] net: neigh: disallow state transition DELAY->STALE in neigh_update()

2016-07-25 Thread Chunhui He
Hello, On Sat, 23 Jul 2016 22:09:43 +0300 (EEST), Julian Anastasov wrote: > > May be that is the problem: we receive such packet, > ip_route_input_noref detects that we allow such packet > from NEIGH_IP on this interface, tip is not RTN_LOCAL (no > ARP reply from us), tip is

Re: [PATCH] net: neigh: disallow state transition DELAY->STALE in neigh_update()

2016-07-25 Thread Chunhui He
Hello, On Sat, 23 Jul 2016 22:09:43 +0300 (EEST), Julian Anastasov wrote: > > May be that is the problem: we receive such packet, > ip_route_input_noref detects that we allow such packet > from NEIGH_IP on this interface, tip is not RTN_LOCAL (no > ARP reply from us), tip is RTN_UNICAST

Re: [PATCH] net: neigh: disallow state transition DELAY->STALE in neigh_update()

2016-07-23 Thread Chunhui He
Hello, Julian. My case is special, so I think the detail(provided below, if you are intresting) is not very important. *It only trigers the real problem*. The neigh system is to reduce ARP traffic, that is good. The problem is it fails to handle some coner cases. The coner case is (let's

Re: [PATCH] net: neigh: disallow state transition DELAY->STALE in neigh_update()

2016-07-23 Thread Chunhui He
Hello, Julian. My case is special, so I think the detail(provided below, if you are intresting) is not very important. *It only trigers the real problem*. The neigh system is to reduce ARP traffic, that is good. The problem is it fails to handle some coner cases. The coner case is (let's

Re: [PATCH] net: neigh: disallow state transition DELAY->STALE in neigh_update()

2016-07-23 Thread Chunhui He
On Sat, 23 Jul 2016 09:17:59 +0300 (EEST), Julian Anastasov wrote: > > In my case, the gateway refuses to send unicast packets to me, before it sees > my ARP request. So it's critical to enter REACHABLE state by sending ARP > request, but not by external confirmation. > > >

Re: [PATCH] net: neigh: disallow state transition DELAY->STALE in neigh_update()

2016-07-23 Thread Chunhui He
On Sat, 23 Jul 2016 09:17:59 +0300 (EEST), Julian Anastasov wrote: > > In my case, the gateway refuses to send unicast packets to me, before it sees > my ARP request. So it's critical to enter REACHABLE state by sending ARP > request, but not by external confirmation. > > > What kind of

Re: [PATCH] net: neigh: disallow state transition DELAY->STALE in neigh_update()

2016-07-22 Thread Chunhui He
Hi, On Fri, 22 Jul 2016 10:20:01 +0300 (EEST), Julian Anastasov <j...@ssi.bg> wrote: > > Hello, > > On Thu, 21 Jul 2016, Chunhui He wrote: > >> If neigh entry was CONNECTED and address is not changed, and if new state is >> STALE, entry sta

Re: [PATCH] net: neigh: disallow state transition DELAY->STALE in neigh_update()

2016-07-22 Thread Chunhui He
Hi, On Fri, 22 Jul 2016 10:20:01 +0300 (EEST), Julian Anastasov wrote: > > Hello, > > On Thu, 21 Jul 2016, Chunhui He wrote: > >> If neigh entry was CONNECTED and address is not changed, and if new state is >> STALE, entry state will not change. Because DELA

[PATCH] net: neigh: disallow state transition DELAY->STALE in neigh_update()

2016-07-21 Thread Chunhui He
. This fixes neigh_update() not to change to STALE if old state is CONNECTED or DELAY. Signed-off-by: Chunhui He <hchun...@mail.ustc.edu.cn> --- net/core/neighbour.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 510cd62..2

[PATCH] net: neigh: disallow state transition DELAY->STALE in neigh_update()

2016-07-21 Thread Chunhui He
. This fixes neigh_update() not to change to STALE if old state is CONNECTED or DELAY. Signed-off-by: Chunhui He --- net/core/neighbour.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 510cd62..29429eb 100644 --- a/net/core