On Wed, 2015-12-16 at 17:22 +0100, Hannes Frederic Sowa wrote: > Same as in Windows, we miss IPV6_HDRINCL for SOL_IPV6 and SOL_RAW. > The SOL_IP/IP_HDRINCL is not available for IPv6 sockets. [] > diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c [] > @@ -972,6 +972,11 @@ static int do_rawv6_setsockopt(struct sock *sk, > int level, int optname, > return -EFAULT; > > switch (optname) { > + case IPV6_HDRINCL: > + if (sk->sk_type != SOCK_RAW) > + return -EINVAL; > + inet_sk(sk)->hdrincl = !!val;
trivia: ipv4/sockglue.c uses the ternary '? 1 : 0' convention for this. It might be nicer to be consistent. Then again sockglue.c is inconsistent about that too. net/ipv4/ip_sockglue.c:736: inet->hdrincl = val ? 1 : 0; net/ipv4/ip_sockglue.c:743: inet->nodefrag = val ? 1 : 0; net/ipv4/ip_sockglue.c:746: inet->bind_address_no_port = val ? 1 : 0; net/ipv4/ip_sockglue.c:754: inet->recverr = !!val; net/ipv4/ip_sockglue.c:772: inet->mc_loop = !!val; net/ipv4/ip_sockglue.c:1123: inet->freebind = !!val; There's no change to object code either way. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html