]> The Tcpdump Group git mirrors - tcpdump/commitdiff
RPL: test data and fix for printing DAO messages
authorMichael Richardson <[email protected]>
Sun, 5 Jan 2014 16:38:28 +0000 (11:38 -0500)
committerMichael Richardson <[email protected]>
Sun, 5 Jan 2014 16:38:28 +0000 (11:38 -0500)
print-icmp6.c
tests/14-dao.pcap [new file with mode: 0644]
tests/14-daovvv.out [new file with mode: 0644]
tests/TESTLIST

index b200caa9b027db4df33ba7e5f3fcd6646cdbbc02..819ebf5907afaecab9bbe78f262acf7027365412 100644 (file)
@@ -747,10 +747,12 @@ rpl_dao_print(netdissect_options *ndo,
         ND_TCHECK(*dao);
 
         strcpy(dagid_str,"<elided>");
+        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 (file)
index 0000000..9a164e4
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 (file)
index 0000000..8144aaf
--- /dev/null
@@ -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]
index d5d4ef238bd0e4fc8418cdbad42f5449cf5459a5..d33d7280cb6a903b81f6690da082a7e939c8d277 100644 (file)
@@ -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