From: Michael Richardson Date: Sun, 5 Jan 2014 16:38:28 +0000 (-0500) Subject: RPL: test data and fix for printing DAO messages X-Git-Tag: tcpdump-4.6.0~298 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/5637910a9da3b7a9723b5525b8035aa193aefb44 RPL: test data and fix for printing DAO messages --- diff --git a/print-icmp6.c b/print-icmp6.c index b200caa9..819ebf59 100644 --- a/print-icmp6.c +++ b/print-icmp6.c @@ -747,10 +747,12 @@ rpl_dao_print(netdissect_options *ndo, ND_TCHECK(*dao); strcpy(dagid_str,""); + length -= sizeof(struct nd_rpl_dao); if(RPL_DAO_D(dao->rpl_flags)) { ND_TTEST2(dao->rpl_dagid, 16); rpl_format_dagid(dagid_str, dao->rpl_dagid); dao_end += DAGID_LEN; + length -= DAGID_LEN; } ND_PRINT((ndo, " [dagid:%s,seq:%u,instance:%u]", diff --git a/tests/14-dao.pcap b/tests/14-dao.pcap new file mode 100644 index 00000000..9a164e49 Binary files /dev/null and b/tests/14-dao.pcap differ diff --git a/tests/14-daovvv.out b/tests/14-daovvv.out new file mode 100644 index 00000000..8144aafb --- /dev/null +++ b/tests/14-daovvv.out @@ -0,0 +1 @@ +IP6 (hlim 64, next-header ICMPv6 (58) payload length: 24) fe80::216:3eff:fe11:3424 > ff02::1: [icmp6 sum ok] ICMP6, RPL, (CLR)Destination Advertisement Object [dagid:pandora is fun0x0,seq:1,instance:1] diff --git a/tests/TESTLIST b/tests/TESTLIST index d5d4ef23..d33d7280 100644 --- a/tests/TESTLIST +++ b/tests/TESTLIST @@ -58,6 +58,7 @@ ikev2pI2 ikev2pI2.pcap ikev2pI2.out -t -E "file ikev2pI2-secrets.txt" -v -v -v dio01 dio.pcap dio.out -t -v dio02 19-pickdag.pcap 19-pickdag.out -t -v -v dio03 19-pickdag.pcap 19-pickdagvvv.out -t -v -v -v +dao01 14-dao.pcap 14-daovvv.out -t -v -v -v daoack01 26-senddaoack.pcap 26-senddaovv.out -t -v -v -v # IPNET encapsulated site