libpcap/0003-pcap-linux-apparently-ctc-interfaces-on-s390-has-eth.patch

29 lines
753 B
Diff
Raw Normal View History

2019-12-25 15:54:18 +08:00
From b9fa92532328daad84766753422e8a21fd474e6f Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Mon, 29 Sep 2014 08:37:25 +0200
Subject: [PATCH 3/4] pcap-linux: apparently ctc interfaces on s390 has
ethernet DLT
---
pcap-linux.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pcap-linux.c b/pcap-linux.c
2021-09-16 14:28:52 +08:00
index 878f27f..6917203 100644
2019-12-25 15:54:18 +08:00
--- a/pcap-linux.c
+++ b/pcap-linux.c
2021-09-16 14:28:52 +08:00
@@ -2474,6 +2474,10 @@ activate_pf_packet(pcap_t *handle, int is_any_device)
}
2019-12-25 15:54:18 +08:00
}
+ /* Hack to make things work on s390 ctc interfaces */
+ if (strncmp("ctc", device, 3) == 0)
+ handle->linktype = DLT_EN10MB;
+
handlep->ifindex = iface_get_id(sock_fd, device,
handle->errbuf);
if (handlep->ifindex == -1) {
--
2021-09-16 14:28:52 +08:00
2.23.0
2019-12-25 15:54:18 +08:00