ifconfig: add static bridge addresses for vlan 0, not 1

Since fd7edfcdc3 ("bridge: fix lookup for untagged packets in
bridge_transmit()") and b0e38a1373 ("bridge: distinguish no vlan and
vlan 1") we do a better job of distinguishing between untagged and VLAN
1 traffic.

However, ifconfig still defaulted to adding addresses for VLAN 1, rather
than for untagged traffic. Change this to be the most common (i.e.
untagged) option.

Reviewed by:	zlei, philip
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D42188
This commit is contained in:
Kristof Provost 2023-10-13 12:34:06 +02:00
parent f34c9c4e3b
commit 6ace92326f

View file

@ -402,7 +402,7 @@ setbridge_static(if_ctx *ctx, const char *val, const char *mac)
memcpy(req.ifba_dst, ea->octet, sizeof(req.ifba_dst));
req.ifba_flags = IFBAF_STATIC;
req.ifba_vlan = 1; /* XXX allow user to specify */
req.ifba_vlan = 0; /* XXX allow user to specify */
if (do_cmd(ctx, BRDGSADDR, &req, sizeof(req), 1) < 0)
err(1, "BRDGSADDR %s", val);