hi all,
while going thru the ipv6 source code, i found that the frag_id was not in
the network byte order. I guess even in the case of IPv4, the id is not in
NBO. Is that intentional??? i checked freebsd and it gives the frag id in
NBO.
Anycase, i have attached the patch (against ip6_output.c/kernel 2.4.3) below
(notice that some people will do anything to get their name in the kernel
sources:)
regards,
imran
--- linux-2.4.3/net/ipv6/ip6_output.c Thu Jun 22 17:23:26 2000
+++ linux/net/ipv6/ip6_output.c Tue Apr 17 17:08:26 2001
@@ -22,6 +22,7 @@
* etc.
*
* H. von Brand : Added missing #include <linux/string.h>
+ * Imran Patel : frag id should be in NBO
*/
#include <linux/config.h>
@@ -55,7 +56,7 @@
static spinlock_t ip6_id_lock = SPIN_LOCK_UNLOCKED;
spin_lock_bh(&ip6_id_lock);
- fhdr->identification = ipv6_fragmentation_id;
+ fhdr->identification = htonl(ipv6_fragmentation_id);
if (++ipv6_fragmentation_id == 0)
ipv6_fragmentation_id = 1;
spin_unlock_bh(&ip6_id_lock);
|