https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292634

--- Comment #2 from Emrion <[email protected]> ---
Created attachment 267422
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=267422&action=edit
Add scan the span list for bridge_lookup_member

This patch is for 15.0-RELEASE.
-------------------------------

My first intuition was right.

It's well the call to ifconfig_bridge_get_bridge_status() in
sbin/ifconfig/ifbridge.c which answers -1 when a span member is present in the
bridge.

ifconfig_bridge_get_bridge_status() is defined in
lib/libifconfig/libifconfig_bridge.c. The error comes from these lines:
if (ifconfig_bridge_ioctlwrap(h, name, BRDGGIFVLANSET, &vreq,
                    sizeof(vreq), false) != 0) {
                        goto err;
                }

Looking at sys/net/if_bridge.c, the function bridge_ioctl_gifvlanset() is
failed in case of a span member at: bif = bridge_lookup_member(sc,
req->bv_ifname);

And, finally, inspecting bridge_lookup_member(), I saw that it looks only in
the normal members list, not in the span list (&sc->sc_spanlist). So, I just
added some lines to look into the span list before to return NULL.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to