Date: Sat, 9 Nov 2013 01:52:10 +0400 From: Gleb Smirnoff <glebius@FreeBSD.org> To: Bear <jilingshu@gmail.com> Cc: freebsd-net@freebsd.org Subject: Re: ng_patch and 802.11Q Message-ID: <20131108215210.GH7577@FreeBSD.org> In-Reply-To: <527C799D.8020208@Gmail.com> References: <527C799D.8020208@Gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Nov 08, 2013 at 02:11:49AM -0330, Bear wrote: B> Hi all, B> I want to modify VLAN priority by ng_patch. After reading the manpage of B> ng_patch(http://www.freebsd.org/cgi/man.cgi?query=ng_patch) and the B> example it given: B> B> > /usr/sbin/ngctl -f- <<-SEQ B> > mkpeer ipfw: patch 200 in B> > name ipfw:200 ttl_add B> > msg ttl_add: setconfig { count=1 csum_flags=1 ops=[ \ B> > { mode=2 value=3 length=1 offset=8 } ] } B> > SEQ B> > /sbin/ipfw add 150 netgraph 200 ip from any to simplex.remote.net B> B> It seems ng_patch can only modify IP header. However, the position of B> VLAN header is before IP header and after Ethernet header. How can I B> modify it? ipfw allows you to intercept packets at IP layer. Tp modify VLAN header, you need to capture them earlier. May be ng_ether(4) will help you. -- Totus tuus, Glebius.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131108215210.GH7577>