Dear all,

I have found a bug in the ip6encap element. The element sets the IP version 
and flags first and then the flow label, which is only 20 bits, but stored in 
a uint32_t. In this order the IP version and flags are overwritten, so I 
reordered them, as is found in other elements. Please find attached a patch 
against the latest git version of ip6encap.cc .

Best regards,
Erwin
--- ip6encap.cc	2011-05-11 16:10:13.861538443 +0200
+++ ip6encap-new.cc	2011-05-11 16:17:11.502151006 +0200
@@ -62,9 +62,9 @@
     else if (!cp_ip6_address(dst_str, _iph6.ip6_dst.s6_addr, this))
         return errh->error("DST argument should be IP address or 'DST_ANNO'");
     // set up IP6 header
+    _iph6.ip6_flow = flow;
     _iph6.ip6_v = 6;
     _iph6.ip6_tc = ip_class;
-    _iph6.ip6_flow = flow;
     _iph6.ip6_plen = 0;
     _iph6.ip6_nxt = proto;
     _iph6.ip6_hlim = hlim;
_______________________________________________
click mailing list
[email protected]
https://amsterdam.lcs.mit.edu/mailman/listinfo/click

Reply via email to