lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 27 Jul 2016 12:25:13 +0000 (UTC)
From:	Chunhui He <hchunhui@...l.ustc.edu.cn>
To:	ja@....bg
Cc:	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [net-next] neigh: allow admin to set NUD_STALE


On Wed, 27 Jul 2016 09:56:50 +0300, Julian Anastasov <ja@....bg> wrote:
> Admin should be able to set any state. Currently, this fails
> when lladdr is not changed and state is changed from
> NUD_CONNECTED to NUD_STALE:
> 
> ip neigh add 192.168.8.1 lladdr 00:11:22:33:44:55 nud perm dev wlan0
> ip neigh show to 192.168.8.1
> 192.168.8.1 dev wlan0 lladdr 00:11:22:33:44:55 PERMANENT
> ip neigh change 192.168.8.1 lladdr 00:11:22:33:44:55 nud stale dev wlan0
> ip neigh show to 192.168.8.1
> 192.168.8.1 dev wlan0 lladdr 00:11:22:33:44:55 PERMANENT
> 
> Problem may be from 2.1.X days.
> 
> Signed-off-by: Julian Anastasov <ja@....bg>
> ---
>  net/core/neighbour.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/core/neighbour.c b/net/core/neighbour.c
> index cf26e04c4..2ae929f 100644
> --- a/net/core/neighbour.c
> +++ b/net/core/neighbour.c
> @@ -1148,7 +1148,8 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
>  			} else
>  				goto out;
>  		} else {
> -			if (lladdr == neigh->ha && new == NUD_STALE)
> +			if (lladdr == neigh->ha && new == NUD_STALE &&
> +			    !(flags & NEIGH_UPDATE_F_ADMIN))
>  				new = old;
>  		}
>  	}

Reviewed-by: Chunhui He <hchunhui@...l.ustc.edu.cn>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ