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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 10 Jul 2016 10:12:24 +0900
From:	Simon Horman <simon.horman@...ronome.com>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] tunnels: correct conditional build of MPLS

On Sun, Jul 10, 2016 at 09:20:54AM +0900, Simon Horman wrote:
> * If MPLS is not enabled then err_mpls is not needed
> * If IPV6 is not enabled then unregistering IPPROTO_IPV6 is not
>   needed in the error path and err_ipv6 is not needed
> * When unregistering IPPROTO_IPV6 the tunnel64_protocol structure
>   rather than the tunnel4_protocol structure should be used.
> * If neither MPLS nor IPV6 are enabled then unregistering IPPROTO_IPIP
>   is not needed in the error path
> 
> Fixes: 8afe97e5d416 ("tunnels: support MPLS over IPv4 tunnels")
> Signed-off-by: Simon Horman <simon.horman@...ronome.com>

I realised this still has some problems. I will send v2.

> ---
>  net/ipv4/tunnel4.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/net/ipv4/tunnel4.c b/net/ipv4/tunnel4.c
> index 45cd4253583a..1dd098b890a7 100644
> --- a/net/ipv4/tunnel4.c
> +++ b/net/ipv4/tunnel4.c
> @@ -219,12 +219,16 @@ static int __init tunnel4_init(void)
>  #endif
>  	return 0;
>  
> -#if IS_ENABLED(CONFIG_IPV6)
> +#if IS_ENABLED(CONFIG_MPLS)
>  err_mpls:
> -	inet_del_protocol(&tunnel4_protocol, IPPROTO_IPV6);
>  #endif
> +#if IS_ENABLED(CONFIG_IPV6)
> +	inet_del_protocol(&tunnel64_protocol, IPPROTO_IPV6);
>  err_ipv6:
> +#endif
> +#if IS_ENABLED(CONFIG_MPLS) || IS_ENABLED(CONFIG_IPV6)
>  	inet_del_protocol(&tunnel4_protocol, IPPROTO_IPIP);
> +#endif
>  err_ipip:
>  	pr_err("%s: can't add protocol\n", __func__);
>  	return -EAGAIN;
> -- 
> 2.7.0.rc3.207.g0ac5344
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ