Date: Mon, 5 Mar 2012 09:58:42 -0800 From: hiren panchasara <hiren.panchasara@gmail.com> To: Andrew Thompson <thompsa@freebsd.org> Cc: freebsd-net@freebsd.org Subject: Re: bridge interface type Message-ID: <CALCpEUHLa1GoPPzQPWx2Og1AT-tQueU5Mox0eUv%2BTw_PLFN8CA@mail.gmail.com> In-Reply-To: <CAFAOGNR7jGCrBQqyiR4oBu8C8MKDCV1tCSu0fgx_Uk=rYTY=xQ@mail.gmail.com> References: <CALCpEUGQ-3tci4EXrTA8yroydWxPoUpnH4sxtQn0uti9cP=P1Q@mail.gmail.com> <CALCpEUEgFO_b8r4sA==a1MM4LEvQN5d%2BGxZ7yS-z665yw1q_ag@mail.gmail.com> <CAFAOGNR7jGCrBQqyiR4oBu8C8MKDCV1tCSu0fgx_Uk=rYTY=xQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Mar 4, 2012 at 11:14 PM, Andrew Thompson <thompsa@freebsd.org>wrote:
> Here is a patch that changes it but I do not know what may break.
>
Thanks a lot Andrew. So, someone might be relying on interface type of
bridge being IFT_ETHER?
Who can confirm if this is a good patch?
>
> Index: if_bridge.c
> ===================================================================
> --- if_bridge.c (revision 232321)
> +++ if_bridge.c (working copy)
> @@ -568,6 +568,7 @@ bridge_clone_create(struct if_clone *ifc, int unit
> {
> struct bridge_softc *sc, *sc2;
> struct ifnet *bifp, *ifp;
> + struct sockaddr_dl *sdl;
> int fb, retry;
> unsigned long hostid;
>
> @@ -642,6 +643,8 @@ bridge_clone_create(struct if_clone *ifc, int unit
> /* Now undo some of the damage... */
> ifp->if_baudrate = 0;
> ifp->if_type = IFT_BRIDGE;
> + sdl = (struct sockaddr_dl *)ifp->if_addr->ifa_addr;
> + sdl->sdl_type = IFT_BRIDGE;
>
> mtx_lock(&bridge_list_mtx);
> LIST_INSERT_HEAD(&bridge_list, sc, sc_list);
>
Appreciate your help,
Hiren
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALCpEUHLa1GoPPzQPWx2Og1AT-tQueU5Mox0eUv%2BTw_PLFN8CA>
