From c5bd0b20ad365a313581b7752b6d368a6a2ece5d Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Mon, 15 Aug 2022 10:52:27 +1000 Subject: [PATCH] ctdb-common: Support IB in pcap-based capture Add simple support for IPoIB via DLT_LINUX_SLL and DLT_LINUX_SLL2. This seems to work, even when an IB interface is specified. If this is later found to be insufficient, support for DLT_IPOIB can be implemented. See https://www.tcpdump.org/linktypes.html for a starting point. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs (cherry picked from commit 9f7d69a05b6114efe18bf4c86ca8de7789e9a96d) --- ctdb/common/system_socket.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ctdb/common/system_socket.c b/ctdb/common/system_socket.c index 9f7ca07e098..06dc558eb22 100644 --- a/ctdb/common/system_socket.c +++ b/ctdb/common/system_socket.c @@ -1064,6 +1064,7 @@ int ctdb_sys_read_tcp_packet(int s, uint16_t arphrd_type = ntohs(sll->sll_hatype); switch (arphrd_type) { case ARPHRD_ETHER: + case ARPHRD_INFINIBAND: break; default: DBG_DEBUG("SLL: Unknown arphrd_type %"PRIu16"\n", @@ -1081,6 +1082,7 @@ int ctdb_sys_read_tcp_packet(int s, uint16_t arphrd_type = ntohs(sll2->sll2_hatype); switch (arphrd_type) { case ARPHRD_ETHER: + case ARPHRD_INFINIBAND: break; default: DBG_DEBUG("SLL2: Unknown arphrd_type %"PRIu16"\n", -- 2.47.2