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:	Wed, 15 Feb 2012 06:06:50 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Benjamin LaHaise <bcrl@...ck.org>
Cc:	James Chapman <jchapman@...alix.com>, netdev@...r.kernel.org
Subject: Re: [RFC] l2tp/ipv6: support for L2TPv2 over UDP over IPv6

Le mardi 14 février 2012 à 17:31 -0500, Benjamin LaHaise a écrit :
> Hello folks,
> 
> Below is a patch that adds support for L2TPv2 over UDP over IPv6.  It's an 
> RFC at present due to 2 outstanding issues: the first is that struct 
> pppol2tp_addr and pppol2tpv3_addr have an embedded struct sockaddr_in, and 
> these changes have not implemented a replacement of those socket addresses.  
> Since the existing pppol2tp{,v3}_addr structures did not place the sockaddr_in 
> at the end of the structure, IPv6 addresses cannot be embedded without 
> changing the ABI.  The question becomes one of how: just add a version of the 
> pppol2tp_addr structure with a sockaddr_in6 embedded in it (easily done, as 
> the different in address structures can be detected via sin_family in the 
> embedded address), or replace it wholesale with a new pppol2tp_addr that has 
> the embedded address at the end of the structure?  That is:
> 
> 	struct pppol2tp_addr_in6 {
> 		int			pid;
> 		int			fd;
> 		struct sockaddr_in6	addr;
> 		u16			s_tunnel, s_session;
> 		u16			d_tunnel, d_session;
> 	};
> 
> or
> 
> 	struct new_pppol2tp_addr {
> 		int			pid;
> 		int			fd;
> 		u32			s_tunnel, s_session;
> 		u32			d_tunnel, d_session;
> 		struct sockaddr_in6	addr;
> 	};
> 
My personal choice would be the latter .



> +#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
> +	if (sk->sk_family == PF_INET6) {
> +		psum = csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
> +				       &ipv6_hdr(skb)->daddr, ulen,
> +				       IPPROTO_UDP, 0);
> +	} else
> +#endif
> +	{


Please use the modern :

#if IS_ENABLED(CONFIG_IPV6)



--
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