kern/152141: [vlan] encapsulate vlan in ng_ether before output to if

Rozhuk Ivan Rozhuk_I at mail.ru
Mon Nov 15 01:27:54 UTC 2010


This is a patched version of original function

code
	/*
	 * If underlying interface can not do VLAN tag insertion itself
	 * then attach a packet tag that holds it.
	 */
	if ((m->m_flags & M_VLANTAG) &&
	    (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) == 0) {
		m = ether_vlanencap(m, m->m_pkthdr.ether_vtag);
		if (m == NULL) {
			ifp->if_oerrors++;
			return (ENOBUFS);
		}
		m->m_flags &= ~M_VLANTAG;
	}


was added

 
--
Rozhuk Ivan
  





More information about the freebsd-net mailing list