summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2022-01-03 20:11:30 +0300
committerDavid S. Miller <davem@davemloft.net>2022-01-04 15:17:35 +0300
commitfa55a7d745de2d10489295b0674a403e2a5d490d (patch)
treeacc2231d961e34eea340484bacbf1bcc15539deb /include
parente8fe9e8308b227002d68d6a32bbd141386727328 (diff)
downloadlinux-fa55a7d745de2d10489295b0674a403e2a5d490d.tar.xz
seg6: export get_srh() for ICMP handling
An ICMP error message can contain in its message body part of an IPv6 packet which invoked the error. Such a packet might contain a segment router header. Export get_srh() so the ICMP code can make use of it. Since his changes the scope of the function from local to global, add the seg6_ prefix to keep the namespace clean. And move it into seg6.c so it is always available, not just when IPV6_SEG6_LWTUNNEL is enabled. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: David Ahern <dsahern@kernel.org> Reviewed-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/seg6.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/seg6.h b/include/net/seg6.h
index 9d19c15e8545..a6f25983670a 100644
--- a/include/net/seg6.h
+++ b/include/net/seg6.h
@@ -58,6 +58,7 @@ extern int seg6_local_init(void);
extern void seg6_local_exit(void);
extern bool seg6_validate_srh(struct ipv6_sr_hdr *srh, int len, bool reduced);
+extern struct ipv6_sr_hdr *seg6_get_srh(struct sk_buff *skb, int flags);
extern int seg6_do_srh_encap(struct sk_buff *skb, struct ipv6_sr_hdr *osrh,
int proto);
extern int seg6_do_srh_inline(struct sk_buff *skb, struct ipv6_sr_hdr *osrh);