Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

IPv6: RTM_GETROUTE: Add RTA_ENCAP to result

This patch adds an IPv6 routes encapsulation attribute
to the result of netlink RTM_GETROUTE requests
(i.e. ip route get 2001:db8::).

Signed-off-by: Oliver Herms <oliver.peter.herms@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20201118230651.GA8861@tws
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Oliver Herms and committed by
Jakub Kicinski
6b13d8f7 b680a214

+4
+4
net/ipv6/route.c
··· 5558 5558 5559 5559 if (dst->dev && nla_put_u32(skb, RTA_OIF, dst->dev->ifindex)) 5560 5560 goto nla_put_failure; 5561 + 5562 + if (dst->lwtstate && 5563 + lwtunnel_fill_encap(skb, dst->lwtstate, RTA_ENCAP, RTA_ENCAP_TYPE) < 0) 5564 + goto nla_put_failure; 5561 5565 } else if (rt->fib6_nsiblings) { 5562 5566 struct fib6_info *sibling, *next_sibling; 5563 5567 struct nlattr *mp;