vlan & bridging broken since if_vlan directly calls the driver

From: Doug Ambrisko (ambrisko_at_ambrisko.com)
Date: 01/21/05

  • Next message: Ingo: "Re: [PATCH] 802.1p priority (fixed)"
    To: freebsd-net@freebsd.org
    Date: Fri, 21 Jan 2005 14:49:18 -0800 (PST)
    
    

    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.
    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"


  • Next message: Ingo: "Re: [PATCH] 802.1p priority (fixed)"

    Relevant Pages

    • Re: no network access on todays CURRENT
      ... If so, Yar has found a typo in the code, which did not get enough testing before commit. ... re-entry (e.g. bridge, vlan, netgraph) but should not be ...
      (freebsd-current)
    • Re: no network access on todays CURRENT
      ... e.g. vlan, netgraph, if_bridge? ... dhclient would, I believe. ... the wi0 device isn't seen during the kernel ...
      (freebsd-current)
    • Re: Broadcom bge and 802.1Q vlan tags
      ... >>have a proprietary Netgraph node here that demultiplexes VLANs. ... do the VLAN processing there, ... Ruslan Ermilov ...
      (freebsd-current)
    • Re: vlan/bridge problems..
      ... Doug Ambrisko wrote: ... |>> | I tried to bridge vlan with ethernet but I am having troubles. ... Only if doing netgraph vlan. ...
      (freebsd-net)