vlan & bridging broken since if_vlan directly calls the driver

Doug Ambrisko ambrisko at ambrisko.com
Fri Jan 21 14:49:19 PST 2005


I found a bug with vlan, netgraph, ipfw and ipfw bridging.  The vlan driver
directly calls the HW driver it is associated with on out packets.
If you have a bridge setup it will only send out on the NIC that
the vlan is attached to.  It should go out to the bridge and each NIC.
Input works okay.

What I'd like to do is move the netgraph out shim from 
if_ethersubr.c:ether_output
        /* Handle ng_ether(4) processing, if any */
        if (ng_ether_output_p != NULL) {
                if ((error = (*ng_ether_output_p)(ifp, &m)) != 0) {
bad:                    if (m != NULL)
                                m_freem(m);
                        return (error);
                }
                if (m == NULL)
                        return (0);
        }
 
to ether_output_frame then in if_vlan.c:vlan_start change   
        IFQ_HANDOFF(p, m, error);
to
        ether_output_frame(p, m);

This should make it work correctly and unify the ipfw/netgraph
hooks.

Let me know what you think and then I'll do it.

Thanks,

Doug A.


More information about the freebsd-net mailing list