ifname_subobj = (const struct icmp_interface_identification_ifname_subobject_t *) offset;
inft_name_length_field = GET_U_1(ifname_subobj->length);
ND_PRINT("\n\t\t Interface Name");
+ if (inft_name_length_field == 0) {
+ ND_PRINT(" [length %u]", inft_name_length_field);
+ nd_print_invalid(ndo);
+ break;
+ }
if (inft_name_length_field % 4 != 0) {
ND_PRINT(" [length %u != N x 4]", inft_name_length_field);
nd_print_invalid(ndo);
# ICMPv4 -- pcap from https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6632
rfc5837 icmp-rfc5837.pcap icmp-rfc5837.out -v
+icmp_inft_name_length_zero icmp_inft_name_length_zero.pcap icmp_inft_name_length_zero.out -v
# ICMPv6
icmpv6 icmpv6.pcap icmpv6.out -vv
--- /dev/null
+ 1 10:13:29.4294643617 IP [total length 33008 > length 240] (invalid) (tos 0x0, ttl 254, id 59168, offset 0, flags [DF], proto ICMP (1), length 33008, bad cksum 7ade (->464)!)
+ 0.128.255.255 > 12.4.4.4: ICMP time exceeded in-transit, length 32988
+ IP (tos 0x0, ttl 1, id 42321, offset 0, flags [none], proto UDP (17), length 40, bad cksum f76a (->db81)!)
+ 8.15.4.4.42315 > 12.223.32.1.33440: UDP, length 12
+ ICMP Multi-Part extension v2
+ Interface Identification Object (2), Class-Type: 2, length 8016
+ This object describes the IP interface upon which a datagram arrived
+ Interface Name [length 0] (invalid) [|icmp]