[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240220194444.36127-4-justin.iurman@uliege.be>
Date: Tue, 20 Feb 2024 20:44:44 +0100
From: Justin Iurman <justin.iurman@...ege.be>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net,
dsahern@...nel.org,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
linux-kernel@...r.kernel.org,
justin.iurman@...ege.be
Subject: [PATCH net-next 3/3] net: exthdrs: ioam6: send trace event
If we're processing an IOAM Pre-allocated Trace Option-Type (the only
one supported currently), and if we're the destination, then send the
trace as an ioam6 event to the multicast group. This way, user space
apps will be able to collect IOAM data (for a trace, it only makes sense
to send events if we're the destination).
Signed-off-by: Justin Iurman <justin.iurman@...ege.be>
---
net/ipv6/exthdrs.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index 4952ae792450..d1f96a28e190 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -50,6 +50,7 @@
#endif
#include <net/rpl.h>
#include <linux/ioam6.h>
+#include <linux/ioam6_genl.h>
#include <net/ioam6.h>
#include <net/dst_metadata.h>
@@ -944,6 +945,10 @@ static bool ipv6_hop_ioam(struct sk_buff *skb, int optoff)
ip6_route_input(skb);
ioam6_fill_trace_data(skb, ns, trace, true);
+
+ if (skb_dst(skb)->dev->flags & IFF_LOOPBACK)
+ ioam6_event(IOAM6_EVENT_TRACE, dev_net(skb->dev),
+ GFP_ATOMIC, (void *)trace, hdr->opt_len-2);
break;
default:
break;
--
2.34.1
Powered by blists - more mailing lists