summaryrefslogtreecommitdiffstats
path: root/net/tipc/bcast.c
diff options
context:
space:
mode:
authorJohn Rutherford <john.rutherford@dektech.com.au>2019-08-06 22:52:29 -0400
committerDavid S. Miller <davem@davemloft.net>2019-08-09 01:11:39 -0400
commit6c9081a3915dc0782a8f1424343b794f2cf53d9c (patch)
treef4f751d693daadfe7794648c529958b1da1b7b5b /net/tipc/bcast.c
parent2339ef1cf32744713ba56cd44ab75b0969fd79e1 (diff)
tipc: add loopback device tracking
Since node internal messages are passed directly to the socket, it is not possible to observe those messages via tcpdump or wireshark. We now remedy this by making it possible to clone such messages and send the clones to the loopback interface. The clones are dropped at reception and have no functional role except making the traffic visible. The feature is enabled if network taps are active for the loopback device. pcap filtering restrictions require the messages to be presented to the receiving side of the loopback device. v3 - Function dev_nit_active used to check for network taps. - Procedure netif_rx_ni used to send cloned messages to loopback device. Signed-off-by: John Rutherford <john.rutherford@dektech.com.au> Acked-by: Jon Maloy <jon.maloy@ericsson.com> Acked-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/bcast.c')
-rw-r--r--net/tipc/bcast.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 1336f3cdad38..34f3e5641438 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -406,8 +406,10 @@ int tipc_mcast_xmit(struct net *net, struct sk_buff_head *pkts,
406 rc = tipc_bcast_xmit(net, pkts, cong_link_cnt); 406 rc = tipc_bcast_xmit(net, pkts, cong_link_cnt);
407 } 407 }
408 408
409 if (dests->local) 409 if (dests->local) {
410 tipc_loopback_trace(net, &localq);
410 tipc_sk_mcast_rcv(net, &localq, &inputq); 411 tipc_sk_mcast_rcv(net, &localq, &inputq);
412 }
411exit: 413exit:
412 /* This queue should normally be empty by now */ 414 /* This queue should normally be empty by now */
413 __skb_queue_purge(pkts); 415 __skb_queue_purge(pkts);