Date: Tue, 28 Jun 2005 21:00:37 GMT From: Andrew Thompson <thompsa@freebsd.org> To: freebsd-pf@FreeBSD.org Subject: Re: ia64/81284: Unaligned Reference with pf on 5.4/IA64 Message-ID: <200506282100.j5SL0bmv063764@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ia64/81284; it has been noted by GNATS. From: Andrew Thompson <thompsa@freebsd.org> To: bug-followup@FreeBSD.org Cc: Subject: Re: ia64/81284: Unaligned Reference with pf on 5.4/IA64 Date: Wed, 29 Jun 2005 08:50:18 +1200 A complementary patch for bridge.c using the same macros and routines as if_bridge. As far as I can tell ipv6 isn't filtered. Index: bridge.c =================================================================== RCS file: /home/ncvs/src/sys/net/bridge.c,v retrieving revision 1.92 diff -u -r1.92 bridge.c --- bridge.c 10 Jun 2005 16:49:18 -0000 1.92 +++ bridge.c 28 Jun 2005 20:44:10 -0000 @@ -1026,6 +1026,19 @@ m_adj(m0, ETHER_HDR_LEN); /* temporarily strip header */ /* + * Check that the IP header is aligned before passing up to the packet + * filter. + */ + if (ntohs(save_eh.ether_type) == ETHERTYPE_IP && + IP_HDR_ALIGNED_P(mtod(m0, caddr_t)) == 0) { + if ((m = m_copyup(m0, sizeof(struct ip), + (max_linkhdr + 3) & ~3)) == NULL) { + bdg_dropped++; + return NULL; + } + } + + /* * NetBSD-style generic packet filter, pfil(9), hooks. * Enables ipf(8) in bridging. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200506282100.j5SL0bmv063764>