]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: Fix getsockopt() for sockets with default IPV6_AUTOFLOWLABEL
authorBen Hutchings <ben.hutchings@codethink.co.uk>
Mon, 22 Jan 2018 20:06:42 +0000 (20:06 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Jan 2018 00:53:24 +0000 (19:53 -0500)
commit5cd3a9ab261a6a8335d63ec7101c43aab5f6284f
treecda833699bac10f733fb98620c9c166e701ae42b
parent919b7937eefc2be35b93ee6fccc7eeba2624d9e8
ipv6: Fix getsockopt() for sockets with default IPV6_AUTOFLOWLABEL

Commit 430d940d0518 ("net: reevalulate autoflowlabel setting after
sysctl setting") removed the initialisation of
ipv6_pinfo::autoflowlabel and added a second flag to indicate
whether this field or the net namespace default should be used.

The getsockopt() handling for this case was not updated, so it
currently returns 0 for all sockets for which IPV6_AUTOFLOWLABEL is
not explicitly enabled.  Fix it to return the effective value, whether
that has been set at the socket or net namespace level.

Fixes: 430d940d0518 ("net: reevalulate autoflowlabel setting after sysctl ...")
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ipv6.h
net/ipv6/ip6_output.c
net/ipv6/ipv6_sockglue.c