Patch "net: lwtunnel: Handle lwtunnel_fill_encap failure" 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
net: lwtunnel: Handle lwtunnel_fill_encap failure
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:
net-lwtunnel-handle-lwtunnel_fill_encap-failure.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 Wed Feb 1 08:49:51 CET 2017
From: David Ahern <[email protected]>
Date: Wed, 11 Jan 2017 14:29:54 -0800
Subject: net: lwtunnel: Handle lwtunnel_fill_encap failure
From: David Ahern <[email protected]>
[ Upstream commit ea7a80858f57d8878b1499ea0f1b8a635cc48de7 ]
Handle failure in lwtunnel_fill_encap adding attributes to skb.
--- net/ipv4/fib_semantics.c | 11 +++++++---- net/ipv6/route.c | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-)
net/ipv4/fib_semantics.c +7 -4
@@ -1277,8 +1277,9 @@ int fib_dump_info(struct sk_buff *skb, u nla_put_u32(skb, RTA_FLOW, fi->fib_nh[0].nh_tclassid)) goto nla_put_failure;#endif -if (fi->fib_nh->nh_lwtstate) -lwtunnel_fill_encap (skb, fi->fib_nh->nh_lwtstate); +if (fi->fib_nh->nh_lwtstate && +lwtunnel_fill_encap (skb, fi->fib_nh->nh_lwtstate) <0 ) + goto nla_put_failure; }#ifdef CONFIG_IP_ROUTE_MULTIPATH if (fi->fib_nhs >1 ) {
@@ -1314,8 +1315,10 @@ int fib_dump_info(struct sk_buff *skb, u nla_put_u32(skb, RTA_FLOW, nh->nh_tclassid)) goto nla_put_failure;#endif -if (nh->nh_lwtstate) -lwtunnel_fill_encap (skb, nh->nh_lwtstate); +if (nh->nh_lwtstate && +lwtunnel_fill_encap (skb, nh->nh_lwtstate) <0 ) + goto nla_put_failure; +/* length of rtnetlink header + attributes */ rtnh->rtnh_len =nlmsg_get_pos (skb) - (void *) rtnh; }endfor_nexthops (fi);
net/ipv6/route.c +2 -1
@@ -3196,7 +3196,8 @@ static int rt6_fill_node(struct net *netif (nla_put_u8 (skb,RTA_PREF ,IPV6_EXTRACT_PREF (rt->rt6i_flags))) goto nla_put_failure; -lwtunnel_fill_encap (skb, rt->dst.lwtstate); +if (lwtunnel_fill_encap (skb, rt->dst.lwtstate) <0 ) + goto nla_put_failure;nlmsg_end (skb, nlh);return 0 ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/net-lwtunnel-handle-lwtunnel_fill_encap-failure.patch queue-4.4/net-ipv4-fix-table-id-in-getroute-response.patch