diff options
author | David Ahern <dsa@cumulusnetworks.com> | 2017-01-11 14:29:54 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-12 15:11:43 -0500 |
commit | ea7a80858f57d8878b1499ea0f1b8a635cc48de7 (patch) | |
tree | 5befd248f3af2f3a74bcaa7f4a4d2117f9c6a5fe /net/ipv6 | |
parent | 18a3ed59d09cf81a6447aadf6931bf0c9ffec5e0 (diff) | |
download | op-kernel-dev-ea7a80858f57d8878b1499ea0f1b8a635cc48de7.zip op-kernel-dev-ea7a80858f57d8878b1499ea0f1b8a635cc48de7.tar.gz |
net: lwtunnel: Handle lwtunnel_fill_encap failure
Handle failure in lwtunnel_fill_encap adding attributes to skb.
Fixes: 571e722676fe ("ipv4: support for fib route lwtunnel encap attributes")
Fixes: 19e42e451506 ("ipv6: support for fib route lwtunnel encap attributes")
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/route.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index ce5aaf4..4f6b067 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -3317,7 +3317,8 @@ static int rt6_fill_node(struct net *net, if (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; |