Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jan 2005 14:49:18 -0800 (PST)
From:      Doug Ambrisko <ambrisko@ambrisko.com>
To:        freebsd-net@freebsd.org
Subject:   vlan & bridging broken since if_vlan directly calls the driver
Message-ID:  <200501212249.j0LMnIVn020454@ambrisko.com>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501212249.j0LMnIVn020454>