diff options
| author | Sven Eckelmann <sven@narfation.org> | 2020-10-24 21:40:40 +0200 |
|---|---|---|
| committer | Sven Eckelmann <sven@narfation.org> | 2020-10-24 22:02:21 +0200 |
| commit | 351c782c20c4caa46cc893134f636a12450d98bb (patch) | |
| tree | 553b7b2696cf5a1528aadc902248a2a9a60292d2 | |
| parent | c197ddb22531098df2c4081a432bbc07259024d2 (diff) | |
batctl: Merge bugfixes from 2020.4
* tcpdump: Fix endianness in ICMPv6 Echo Request/Reply parsing
Signed-off-by: Sven Eckelmann <sven@narfation.org>
| -rw-r--r-- | batctl/Makefile | 2 | ||||
| -rw-r--r-- | batctl/patches/0004-batctl-tcpdump-Fix-endianness-in-ICMPv6-Echo-Request.patch | 39 |
2 files changed, 40 insertions, 1 deletions
diff --git a/batctl/Makefile b/batctl/Makefile index 95124f0..ba83914 100644 --- a/batctl/Makefile +++ b/batctl/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=batctl PKG_VERSION:=2018.1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_HASH:=27877d0da6916f88a6cecbbb3f3d23cc4558ef7c7294324bf4fd050ed606b553 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz diff --git a/batctl/patches/0004-batctl-tcpdump-Fix-endianness-in-ICMPv6-Echo-Request.patch b/batctl/patches/0004-batctl-tcpdump-Fix-endianness-in-ICMPv6-Echo-Request.patch new file mode 100644 index 0000000..b7250af --- /dev/null +++ b/batctl/patches/0004-batctl-tcpdump-Fix-endianness-in-ICMPv6-Echo-Request.patch @@ -0,0 +1,39 @@ +From: Linus Lüssing <linus.luessing@c0d3.blue> +Date: Sun, 13 Sep 2020 23:30:19 +0200 +Subject: batctl: tcpdump: Fix endianness in ICMPv6 Echo Request/Reply parsing + +The ICMPv6 Echo Request/Reply sequence number and id as well as the +IPv6 header length are two byte long fields and therefore might need a +conversion on a little endian system. Otherwise the output will be +broken on such a machine. + +Fixes: 35b37756f4a3 ("add IPv6 support to tcpdump parser") +Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue> +Signed-off-by: Sven Eckelmann <sven@narfation.org> + +Origin: upstream, https://git.open-mesh.org/batctl.git/commit/e42f73d0d2a04edfbed1b9d0ad9fd57af9e90faf + +diff --git a/tcpdump.c b/tcpdump.c +index c41500e21eda0abc1f024a3265c23fc3a4802d17..22847aecf887566ac62ff2084079683d0acf83aa 100644 +--- a/tcpdump.c ++++ b/tcpdump.c +@@ -551,13 +551,15 @@ static void dump_ipv6(unsigned char *packet_buff, ssize_t buff_len, + break; + case ICMP6_ECHO_REQUEST: + printf(" echo request, id: %d, seq: %d, length: %hu\n", +- icmphdr->icmp6_id, icmphdr->icmp6_seq, +- iphdr->ip6_plen); ++ ntohs(icmphdr->icmp6_id), ++ ntohs(icmphdr->icmp6_seq), ++ ntohs(iphdr->ip6_plen)); + break; + case ICMP6_ECHO_REPLY: + printf(" echo reply, id: %d, seq: %d, length: %hu\n", +- icmphdr->icmp6_id, icmphdr->icmp6_seq, +- iphdr->ip6_plen); ++ ntohs(icmphdr->icmp6_id), ++ ntohs(icmphdr->icmp6_seq), ++ ntohs(iphdr->ip6_plen)); + break; + case ICMP6_TIME_EXCEEDED: + printf(" time exceeded in-transit, length %zu\n", |
