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

From: åèèæ
Date: Mon Jul 25 2016 - 08:46:39 EST


2016-07-25 17:13 GMT+09:00 Chunhui He <hchunhui@xxxxxxxxxxxxxxxx>:
>>> The NEIGH_UPDATE_F_WEAK_OVERRIDE is confusing to me, so I choose not to deal
>>> with the flag.
>> IPv6 depends on WEAK_OVERRIDE. Please do not change.
> It seems like IPv6 always sets WEAK_OVERRIDE.


> As Julian said, maybe there is no good reason to set NUD_STALE for any state
> that is NUD_VALID if address is not changed, even WEAK_OVERRIDE is not set.
> So we may eliminate WEAK_OVERRIDE in that branch.
> I think this change should not break IPv6.

OK, following blocks are "no-op" and we will get same result.

Well, please do not try changing several things at the same time and
you could say:

if (ladder == neigh->ha && new == NUD_STALE &&
!(flags & NUD_UPDATE_F_ADMIN))
new = old;

I think I tried to maintain our traditional IPv4 behavior (e.g. as of
2.2 era), BTW...