Date: Sat, 28 Jun 2008 20:48:00 GMT From: Gleb Kurtsou <gk@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 144240 for review Message-ID: <200806282048.m5SKm0Z7011276@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=144240 Change 144240 by gk@gk_h1 on 2008/06/28 20:47:23 Check for tag in ipfw_check_out also. There is no longer need to store ethernet header in stack before passing it into ipfw_chk. And it's better to be avoided anyway. Affected files ... .. //depot/projects/soc2008/gk_l2filter/sys-netinet/ip_fw_pfil.c#7 edit Differences ... ==== //depot/projects/soc2008/gk_l2filter/sys-netinet/ip_fw_pfil.c#7 (text+ko) ==== @@ -96,7 +96,6 @@ struct ng_ipfw_tag *ng_tag; struct m_tag *tag_ether_hdr; struct m_tag *dn_tag; - struct ether_header eh; int ipfw = 0; int divert; int tee; @@ -119,10 +118,8 @@ tag_ether_hdr = m_tag_locate(*m0, MTAG_ETHER, MTAG_ETHER_HEADER, NULL); - if (tag_ether_hdr != NULL) { - eh = *(struct ether_header *)(tag_ether_hdr + 1); - args.eh = &eh; - } + if (tag_ether_hdr != NULL) + args.eh = (struct ether_header *)(tag_ether_hdr + 1); again: dn_tag = m_tag_find(*m0, PACKET_TAG_DUMMYNET, NULL); @@ -225,6 +222,7 @@ { struct ip_fw_args args; struct ng_ipfw_tag *ng_tag; + struct m_tag *tag_ether_hdr; struct m_tag *dn_tag; int ipfw = 0; int divert; @@ -246,6 +244,11 @@ m_tag_delete(*m0, (struct m_tag *)ng_tag); } + tag_ether_hdr = m_tag_locate(*m0, MTAG_ETHER, MTAG_ETHER_HEADER, + NULL); + if (tag_ether_hdr != NULL) + args.eh = (struct ether_header *)(tag_ether_hdr + 1); + again: dn_tag = m_tag_find(*m0, PACKET_TAG_DUMMYNET, NULL); if (dn_tag != NULL) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806282048.m5SKm0Z7011276>