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] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 26 Oct 2015 08:52:06 -0700
From:	Alexander Duyck <alexander.duyck@...il.com>
To:	Hannes Frederic Sowa <hannes@...essinduktion.org>,
	netdev@...r.kernel.org
Subject: Re: [PATCH net-next] ipv6: recreate ipv6 link-local addresses when
 increasing MTU over IPV6_MIN_MTU

On 10/26/2015 07:36 AM, Hannes Frederic Sowa wrote:
> Take into consideration that the interface might be disabled for IPv6,
> thus switch event type.
>
> Signed-off-by: Hannes Frederic Sowa <hannes@...essinduktion.org>
> ---
>   net/ipv6/addrconf.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
> index d0c685c..c2dcebe 100644
> --- a/net/ipv6/addrconf.c
> +++ b/net/ipv6/addrconf.c
> @@ -3149,6 +3149,7 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
>   
>   	case NETDEV_UP:
>   	case NETDEV_CHANGE:
> +netdev_change:
>   		if (dev->flags & IFF_SLAVE)
>   			break;
>   
> @@ -3244,8 +3245,10 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
>   
>   		if (!idev && dev->mtu >= IPV6_MIN_MTU) {
>   			idev = ipv6_add_dev(dev);
> -			if (!IS_ERR(idev))
> -				break;
> +			if (!IS_ERR(idev)) {
> +				event = NETDEV_UP;
> +				goto netdev_change;
> +			}
>   		}
>   
>   		/*

Seems like this code isn't quite correct.  You are calling ipv6_add_dev 
for slave devices, and if I understand things correctly I don't believe 
that was happening before and may be an unintended side effect.

You might want to instead just make it so that you only do the jump, and 
perhaps change the code in the NETDEV_UP/NETDEV_CHANGE section so that 
you test for NETDEV_CHANGE instead of NETDEV_UP.  That should be enough 
to get the effect you are looking for and I believe there would be no 
change to behaviour other than adding IPv6 link-local addresses when the 
MTU is increased.

Give me a bit and I can submit an alternative that may actually work out 
a bit better I think.

- Alex
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ