diff options
author | thompsa <thompsa@FreeBSD.org> | 2007-06-13 18:58:04 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2007-06-13 18:58:04 +0000 |
commit | fb74a99e0d1f203249890555137ffb25d466c8e2 (patch) | |
tree | 2c9e6d0a01ae299cf50168c539e4a217c0f02a4b /sbin/ifconfig/ifbridge.c | |
parent | b936eeb39ddebd2dd21440a77901dc032bd0f608 (diff) | |
download | FreeBSD-src-fb74a99e0d1f203249890555137ffb25d466c8e2.zip FreeBSD-src-fb74a99e0d1f203249890555137ffb25d466c8e2.tar.gz |
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
Diffstat (limited to 'sbin/ifconfig/ifbridge.c')
-rw-r--r-- | sbin/ifconfig/ifbridge.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); |