summaryrefslogtreecommitdiffstats
path: root/sys/net/if_bridgevar.h
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2006-11-09 06:32:38 +0000
committerthompsa <thompsa@FreeBSD.org>2006-11-09 06:32:38 +0000
commite6cf955ad4f3c344435f4523de9215f577f8c646 (patch)
treecf54c5483f37944549b7a3563be875b05ec80027 /sys/net/if_bridgevar.h
parent2294e5e2a949e36f69b95aeea4f26f4a817f0e57 (diff)
downloadFreeBSD-src-e6cf955ad4f3c344435f4523de9215f577f8c646.zip
FreeBSD-src-e6cf955ad4f3c344435f4523de9215f577f8c646.tar.gz
Add a new address cache type called sticky. On an interface marked sticky any
address learned by the bridge is made permanent, the address will not age out and most importantly will not migrate to another interface. This can be used to stop mac address poisoning or clients roaming in much the same way as static entries without the hassle of preloading the table.
Diffstat (limited to 'sys/net/if_bridgevar.h')
-rw-r--r--sys/net/if_bridgevar.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/if_bridgevar.h b/sys/net/if_bridgevar.h
index ff80526..a5241b9 100644
--- a/sys/net/if_bridgevar.h
+++ b/sys/net/if_bridgevar.h
@@ -140,8 +140,9 @@ struct ifbreq {
#define IFBIF_DISCOVER 0x02 /* if sends packets w/ unknown dest. */
#define IFBIF_STP 0x04 /* if participates in spanning tree */
#define IFBIF_SPAN 0x08 /* if is a span port */
+#define IFBIF_STICKY 0x10 /* if learned addresses stick */
-#define IFBIFBITS "\020\1LEARNING\2DISCOVER\3STP\4SPAN"
+#define IFBIFBITS "\020\1LEARNING\2DISCOVER\3STP\4SPAN\5STICKY"
/* BRDGFLUSH */
#define IFBF_FLUSHDYN 0x00 /* flush learned addresses only */
@@ -173,8 +174,9 @@ struct ifbareq {
#define IFBAF_TYPEMASK 0x03 /* address type mask */
#define IFBAF_DYNAMIC 0x00 /* dynamically learned address */
#define IFBAF_STATIC 0x01 /* static address */
+#define IFBAF_STICKY 0x02 /* sticky address */
-#define IFBAFBITS "\020\1STATIC"
+#define IFBAFBITS "\020\1STATIC\2STICKY"
/*
* Address list structure.
OpenPOWER on IntegriCloud