Subject: Re: 802.1q hardware support
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Jason R Thorpe <thorpej@zembu.com>
List: tech-net
Date: 11/15/2000 10:49:59
On Wed, Nov 15, 2000 at 07:02:57PM +0100, Manuel Bouyer wrote:
> - vlan_input_tag(eh, m, vlan_tag);
> + struct mbuf *n;
> + n = m_aux_add(m, AF_LINK, ETHERTYPE_VLAN);
> + if (n) {
> + *mtod(n, int *) = vlan_tag;
> + n->m_len = sizeof(int);
> + } else
> + printf("%s: no mbuf for tag\n", ifp->if_xname);
> + m->m_flags |= M_VLAN1Q;
In the failure case, you should just drop the packet now, instead of
going through all the processing just to drop it later.
...other than that, looks good.
--
-- Jason R. Thorpe <thorpej@zembu.com>