From fb74a99e0d1f203249890555137ffb25d466c8e2 Mon Sep 17 00:00:00 2001 From: thompsa Date: Wed, 13 Jun 2007 18:58:04 +0000 Subject: Add the vlan tag to the bridge route table. This allows a vlan trunk to be bridged, previously legitimate traffic was not passed as the bridge could not tell that it was on a different Ethernet segment. All non-tagged traffic is treated as vlan1 as per IEEE 802.1Q-2003 --- sbin/ifconfig/ifbridge.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sbin') diff --git a/sbin/ifconfig/ifbridge.c b/sbin/ifconfig/ifbridge.c index 4fa6175..72fd491 100644 --- a/sbin/ifconfig/ifbridge.c +++ b/sbin/ifconfig/ifbridge.c @@ -236,8 +236,8 @@ bridge_addresses(int s, const char *prefix) ifba = ifbac.ifbac_req + i; memcpy(ea.octet, ifba->ifba_dst, sizeof(ea.octet)); - printf("%s%s %s %lu ", prefix, ether_ntoa(&ea), - ifba->ifba_ifsname, ifba->ifba_expire); + printf("%s%s Vlan%d %s %lu ", prefix, ether_ntoa(&ea), + ifba->ifba_vlan, ifba->ifba_ifsname, ifba->ifba_expire); printb("flags", ifba->ifba_flags, IFBAFBITS); printf("\n"); } @@ -474,6 +474,7 @@ setbridge_static(const char *val, const char *mac, int s, memcpy(req.ifba_dst, ea->octet, sizeof(req.ifba_dst)); req.ifba_flags = IFBAF_STATIC; + req.ifba_vlan = 1; /* XXX allow user to specify */ if (do_cmd(s, BRDGSADDR, &req, sizeof(req), 1) < 0) err(1, "BRDGSADDR %s", val); -- cgit v1.1