diff options
author | Ben Hutchings <ben.hutchings@codethink.co.uk> | 2018-01-22 20:06:42 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-23 19:53:24 -0500 |
commit | e9191ffb65d8e159680ce0ad2224e1acbde6985c (patch) | |
tree | cda833699bac10f733fb98620c9c166e701ae42b /net/ipv6/ipv6_sockglue.c | |
parent | 02612bb05e51df8489db5e94d0cf8d1c81f87b0c (diff) | |
download | blackbird-op-linux-e9191ffb65d8e159680ce0ad2224e1acbde6985c.tar.gz blackbird-op-linux-e9191ffb65d8e159680ce0ad2224e1acbde6985c.zip |
ipv6: Fix getsockopt() for sockets with default IPV6_AUTOFLOWLABEL
Commit 513674b5a2c9 ("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: 513674b5a2c9 ("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>
Diffstat (limited to 'net/ipv6/ipv6_sockglue.c')
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 2d4680e0376f..e8ffb5b5d84e 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c @@ -1336,7 +1336,7 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, break; case IPV6_AUTOFLOWLABEL: - val = np->autoflowlabel; + val = ip6_autoflowlabel(sock_net(sk), np); break; case IPV6_RECVFRAGSIZE: |