]> The Tcpdump Group git mirrors - tcpdump/commitdiff
ICMP: Update a variable type
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 17 Jul 2024 07:57:51 +0000 (09:57 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 17 Jul 2024 08:05:39 +0000 (10:05 +0200)
The length of ip_addr can be 4 octet (IPv4 address) if Address Family
Identifier (AFI) is 1 or 16 octets (IPv6 address) if AFI is 2.

print-icmp.c

index daea617f640df0e23a6248bb78fa7fbb40757aa6..b4b50ea4caf688909d8c08432f05df21cfecc4ce 100644 (file)
@@ -359,7 +359,7 @@ Interface IP Address Sub-Object
 struct icmp_interface_information_ipaddr_subobject_t {
     nd_uint16_t  afi;
     nd_uint16_t  reserved;
-    nd_uint32_t  ip_addr;
+    nd_byte  ip_addr[1];
 };
 
 /*