]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Fix commit 833425ab: babel uses 1/100th of seconds, not 1/10th
authorBaptiste Jonglez <[email protected]>
Tue, 4 Mar 2014 17:02:34 +0000 (18:02 +0100)
committerBaptiste Jonglez <[email protected]>
Wed, 5 Mar 2014 12:19:58 +0000 (13:19 +0100)
Also update affected testcases.

print-babel.c
tests/babel1v.out
tests/babel_auth.out

index 4f128b32457679d0fb1e5bd4ed59b217e83c7a3f..af2e1c0cd644a0ef6bd7bbf9f350e7ff17c34d27 100644 (file)
@@ -144,11 +144,11 @@ format_address(const u_char *prefix)
 static const char *
 format_interval(const u_int16_t i)
 {
-    static char buf[sizeof("0000.0s")];
+    static char buf[sizeof("000.00s")];
 
     if (i == 0)
         return "0.0s (bogus)";
-    snprintf(buf, sizeof(buf), "%u.%us", i / 10, i % 10);
+    snprintf(buf, sizeof(buf), "%u.%02us", i / 100, i % 100);
     return buf;
 }
 
index dd26f875821b64414a07c821b7a9c6961a085d91..d483a1460dc3a9cca7b1c2a50e13c84741afba85 100644 (file)
@@ -1,32 +1,32 @@
 IP6 (hlim 1, next-header UDP (17) payload length: 20) fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (8)
-       Hello seqno 8042 interval 200.0s
+       Hello seqno 8042 interval 20.00s
 IP6 (hlim 1, next-header UDP (17) payload length: 20) fe80::3428:af91:251:d626.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (8)
-       Hello seqno 40102 interval 200.0s
+       Hello seqno 40102 interval 20.00s
 IP6 (hlim 1, next-header UDP (17) payload length: 122) fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (110)
-       Update/prefix/id 2001:660:3301:8063:218:84ff:fe1a:615d/128 metric 1 seqno 32272 interval 800.0s sub-diversity 6
+       Update/prefix/id 2001:660:3301:8063:218:84ff:fe1a:615d/128 metric 1 seqno 32272 interval 80.00s sub-diversity 6
        Next Hop 192.168.4.25
-       Update 192.168.4.195/32 metric 1 seqno 32272 interval 800.0s sub-diversity 6
-       Update/prefix/id 2001:660:3301:8063:218:f3ff:fea9:914e/128 metric 0 seqno 40149 interval 800.0s sub-diversity empty
-       Update ::/0 metric 196 seqno 40149 interval 800.0s sub-diversity empty
-       Update 192.168.4.25/32 metric 0 seqno 40149 interval 800.0s sub-diversity empty
+       Update 192.168.4.195/32 metric 1 seqno 32272 interval 80.00s sub-diversity 6
+       Update/prefix/id 2001:660:3301:8063:218:f3ff:fea9:914e/128 metric 0 seqno 40149 interval 80.00s sub-diversity empty
+       Update ::/0 metric 196 seqno 40149 interval 80.00s sub-diversity empty
+       Update 192.168.4.25/32 metric 0 seqno 40149 interval 80.00s sub-diversity empty
 IP6 (hlim 1, next-header UDP (17) payload length: 36) fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (24)
-       Hello seqno 8043 interval 200.0s
-       IHU fe80::3428:af91:251:d626 txcost 96 interval 600.0s
+       Hello seqno 8043 interval 20.00s
+       IHU fe80::3428:af91:251:d626 txcost 96 interval 60.00s
 IP6 (hlim 1, next-header UDP (17) payload length: 20) fe80::3428:af91:251:d626.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (8)
-       Hello seqno 40103 interval 200.0s
+       Hello seqno 40103 interval 20.00s
 IP6 (hlim 1, next-header UDP (17) payload length: 20) fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (8)
-       Hello seqno 8044 interval 200.0s
+       Hello seqno 8044 interval 20.00s
 IP6 (hlim 1, next-header UDP (17) payload length: 36) fe80::3428:af91:251:d626.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (24)
-       Hello seqno 40104 interval 200.0s
-       IHU fe80::68d3:1235:d068:1f9e txcost 96 interval 600.0s
+       Hello seqno 40104 interval 20.00s
+       IHU fe80::68d3:1235:d068:1f9e txcost 96 interval 60.00s
 IP6 (hlim 1, next-header UDP (17) payload length: 20) fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (8)
-       Hello seqno 8045 interval 200.0s
+       Hello seqno 8045 interval 20.00s
 IP6 (hlim 1, next-header UDP (17) payload length: 20) fe80::3428:af91:251:d626.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (8)
-       Hello seqno 40105 interval 200.0s
+       Hello seqno 40105 interval 20.00s
 IP6 (hlim 1, next-header UDP (17) payload length: 64) fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (52)
-       Update/prefix/id 2001:660:3301:8063:218:f3ff:fea9:914e/128 metric 65535 seqno 40149 interval 800.0s
-       Update/prefix 2001:660:3301:8063:218:f3ff:fea9:914e/128 metric 65535 seqno 40149 interval 800.0s
-       Update/prefix 2001:660:3301:8063:218:f3ff:fea9:914e/128 metric 65535 seqno 40149 interval 800.0s
+       Update/prefix/id 2001:660:3301:8063:218:f3ff:fea9:914e/128 metric 65535 seqno 40149 interval 80.00s
+       Update/prefix 2001:660:3301:8063:218:f3ff:fea9:914e/128 metric 65535 seqno 40149 interval 80.00s
+       Update/prefix 2001:660:3301:8063:218:f3ff:fea9:914e/128 metric 65535 seqno 40149 interval 80.00s
 IP6 (hlim 1, next-header UDP (17) payload length: 44) fe80::3428:af91:251:d626.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (32)
        MH-Request (127 hops) for 2001:660:3301:8063:218:f3ff:fea9:914e/128 seqno 40150 id 02:18:f3:ff:fe:a9:91:4e
 IP6 (hlim 1, next-header UDP (17) payload length: 50) fe80::68d3:1235:d068:1f9e.5359 > ff02::cca6:c0f9:e182:5359.5359: [udp sum ok] AHCP Version 1
@@ -45,7 +45,7 @@ IP6 (hlim 1, next-header UDP (17) payload length: 50) fe80::3428:af91:251:d626.5
        Hopcount 1, Original Hopcount 2, Nonce 0xdf3e5127, Source Id 02:18:f3:ff:fe:a9:91:4e, Destination Id ff:ff:ff:ff:ff:ff:ff:ff
        Discover, Length 14
 IP6 (hlim 1, next-header UDP (17) payload length: 40) fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (28)
-       Update/prefix/id 2001:660:3301:8063:218:f3ff:fea9:914e/128 metric 65535 seqno 40149 interval 800.0s
+       Update/prefix/id 2001:660:3301:8063:218:f3ff:fea9:914e/128 metric 65535 seqno 40149 interval 80.00s
 IP6 (hlim 1, next-header UDP (17) payload length: 44) fe80::3428:af91:251:d626.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (32)
        MH-Request (127 hops) for 2001:660:3301:8063:218:f3ff:fea9:914e/128 seqno 40150 id 02:18:f3:ff:fe:a9:91:4e
 IP6 (hlim 64, next-header UDP (17) payload length: 188) fe80::3428:af91:251:d626.5359 > fe80::68d3:1235:d068:1f9e.5359: [udp sum ok] AHCP Version 1
@@ -55,10 +55,10 @@ IP6 (hlim 1, next-header UDP (17) payload length: 50) fe80::68d3:1235:d068:1f9e.
        Hopcount 1, Original Hopcount 1, Nonce 0xe13e5127, Source Id 02:18:f3:ff:fe:a9:91:4e, Destination Id 79:40:14:7f:b6:6d:c3:29
        Request, Length 14
 IP6 (hlim 1, next-header UDP (17) payload length: 36) fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (24)
-       Hello seqno 8046 interval 200.0s
-       IHU fe80::3428:af91:251:d626 txcost 96 interval 600.0s
+       Hello seqno 8046 interval 20.00s
+       IHU fe80::3428:af91:251:d626 txcost 96 interval 60.00s
 IP6 (hlim 1, next-header UDP (17) payload length: 40) fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (28)
-       Update/prefix/id 2001:660:3301:8063:218:f3ff:fea9:914e/128 metric 65535 seqno 40149 interval 800.0s
+       Update/prefix/id 2001:660:3301:8063:218:f3ff:fea9:914e/128 metric 65535 seqno 40149 interval 80.00s
 IP6 (hlim 1, next-header UDP (17) payload length: 44) fe80::3428:af91:251:d626.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (32)
        MH-Request (127 hops) for 2001:660:3301:8063:218:f3ff:fea9:914e/128 seqno 40150 id 02:18:f3:ff:fe:a9:91:4e
 IP6 (hlim 64, next-header UDP (17) payload length: 188) fe80::3428:af91:251:d626.5359 > fe80::68d3:1235:d068:1f9e.5359: [udp sum ok] AHCP Version 1
index 56ca7fd017669f260e24c710d41010261015c683..c918495448b19ff418c69a26b2e021157862bb68 100644 (file)
@@ -1,5 +1,5 @@
 IP6 (class 0xc0, hlim 1, next-header UDP (17) payload length: 436) fe80::b299:28ff:fec8:d646.6696 > ff02::1:6.6696: [udp sum ok] babel 2 (424)
-       Hello seqno 58134 interval 40.0s
+       Hello seqno 58134 interval 4.00s
        Update/id ::/0 metric 65535 seqno 41391 interval infinity
        Request for any
        TS/PC timestamp 1339081200 packetcounter 2