Skip to content

Commit f27d16e

Browse files
committed
IPv6: Print 'No Next Header' when relevant
This avoids to print 'next-header unknown (59)' when it's the first header. Add a test file.
1 parent c69a859 commit f27d16e

File tree

4 files changed

+3
-0
lines changed

4 files changed

+3
-0
lines changed

ipproto.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const struct tok ipproto_values[] = {
3939
{ IPPROTO_AH, "AH" },
4040
{ IPPROTO_MOBILE, "Mobile IP" },
4141
{ IPPROTO_ICMPV6, "ICMPv6" },
42+
{ IPPROTO_NONE, "No Next Header" },
4243
{ IPPROTO_DSTOPTS, "DSTOPT" },
4344
{ IPPROTO_MOBILITY_OLD, "Mobile IP (old)" },
4445
{ IPPROTO_EIGRP, "EIGRP" },

tests/TESTLIST

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ ipv6_jumbogram_invalid_length ipv6_jumbogram_invalid_length.pcap ipv6_jumbogram_
405405
ipv6_39_byte_header ipv6_39_byte_header.pcap ipv6_39_byte_header.out -v
406406
ipv6_missing_jumbo_payload_option ipv6_missing_jumbo_payload_option.pcap ipv6_missing_jumbo_payload_option.out
407407
ipv6_frag6_negative_len ipv6_frag6_negative_len.pcap ipv6_frag6_negative_len.out -v
408+
ipv6_no_next_header ipv6_no_next_header.pcap ipv6_no_next_header.out -v
408409

409410
# Loopback/CTP test case
410411
loopback loopback.pcap loopback.out

tests/ipv6_no_next_header.out

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1 2025-02-11 13:31:22.134532 IP6 (hlim 64, next-header No Next Header (59), payload length 20) 2005::1 > 2008::1: no next header

tests/ipv6_no_next_header.pcap

114 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)