sys/netinet6/ip6_input.c: fix endianess bug
Hiroki Sato
hrs at allbsd.org
Fri Dec 31 15:37:16 PST 2004
Hi,
A patch to fix a bug in fragment header handling is attached.
Fix wrong byte-order conversion on fragment header scanning.
References: KAME: kame/sys/netinet6/ip6_input.c 1.331
FreeBSD: sys/netinet6/ip6_input.c 1.54
Index: ip6_input.c
===================================================================
RCS file: /cvs/src/sys/netinet6/ip6_input.c,v
retrieving revision 1.22
diff -d -u -I\$FreeBSD:.*\$ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$DragonFly:.*\$ -I\$Id:.*\$ -I\$hrs:.*\$ -r1.22 ip6_input.c
--- ip6_input.c 21 Dec 2004 02:54:47 -0000 1.22
+++ ip6_input.c 31 Dec 2004 02:47:02 -0000
@@ -1499,7 +1499,7 @@
if (m->m_pkthdr.len < off + sizeof(fh))
return -1;
m_copydata(m, off, sizeof(fh), (caddr_t)&fh);
- if ((ntohs(fh.ip6f_offlg) & IP6F_OFF_MASK) != 0)
+ if ((fh.ip6f_offlg & IP6F_OFF_MASK) != 0)
return -1;
if (nxtp)
*nxtp = fh.ip6f_nxt;
Attachment:
pgp00000.pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00000.pgp
Type: application/octet-stream
Size: 187 bytes
Desc: "Description: PGP signature"
URL: <http://lists.dragonflybsd.org/pipermail/submit/attachments/20041231/fbef0f15/attachment-0018.obj>
More information about the Submit
mailing list