Patch "ipv6: Fix getsockopt() for sockets with default IPV6_AUTOFLOWLABEL" has been added to the 4.4-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
ipv6: Fix getsockopt() for sockets with default IPV6_AUTOFLOWLABEL
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ipv6-fix-getsockopt-for-sockets-with-default-ipv6_autoflowlabel.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon Jan 29 10:14:57 CET 2018
From: Ben Hutchings <[email protected]>
Date: Mon, 22 Jan 2018 20:06:42 +0000
Subject: ipv6: Fix getsockopt() for sockets with default IPV6_AUTOFLOWLABEL
From: Ben Hutchings <[email protected]>
[ Upstream commit e9191ffb65d8e159680ce0ad2224e1acbde6985c ]
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.
--- include/net/ipv6.h | 1 + net/ipv6/ip6_output.c | 2 +- net/ipv6/ipv6_sockglue.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-)
include/net/ipv6.h +1 -0
@@ -281,6 +281,7 @@ int ipv6_flowlabel_opt_get(struct sock * int flags);int ip6_flowlabel_init (void );void ip6_flowlabel_cleanup (void ); +bool ip6_autoflowlabel (struct net *net,const struct ipv6_pinfo *np);static inline void fl6_sock_release (struct ip6_flowlabel *fl) {
net/ipv6/ip6_output.c +1 -1
@@ -148,7 +148,7 @@ int ip6_output(struct net *net, struct s !(IP6CB(skb)->flags & IP6SKB_REROUTED)); } -static bool ip6_autoflowlabel (struct net *net,const struct ipv6_pinfo *np) +bool ip6_autoflowlabel (struct net *net,const struct ipv6_pinfo *np) {if (!np->autoflowlabel_set)return ip6_default_np_autolabel (net);
net/ipv6/ipv6_sockglue.c +1 -1
@@ -1313,7 +1313,7 @@ static int do_ipv6_getsockopt(struct socbreak ;case IPV6_AUTOFLOWLABEL : - val = np->autoflowlabel; + val =ip6_autoflowlabel (sock_net (sk), np);break ;default :
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/vsyscall-fix-permissions-for-emulate-mode-with-kaiser-pti.patch queue-4.4/ipv6-fix-getsockopt-for-sockets-with-default-ipv6_autoflowlabel.patch queue-4.4/x86-microcode-intel-fix-bdw-late-loading-revision-check.patch