11 #include <linux/module.h>
12 #include <linux/netfilter/x_tables.h>
13 #include <linux/netfilter_bridge/ebtables.h>
16 #define BPDU_TYPE_CONFIG 0
17 #define BPDU_TYPE_TCN 0x80
40 #define NR16(p) (p[0] << 8 | p[1])
41 #define NR32(p) ((p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3])
63 for (i = 0; i < 6; i++)
83 for (i = 0; i < 6; i++)
128 const uint8_t header[6] = {0x42, 0x42, 0x03, 0x00, 0x00, 0x00};
130 sp = skb_header_pointer(skb, 0,
sizeof(_stph), &_stph);
135 if (
memcmp(sp, header,
sizeof(header)))
147 st = skb_header_pointer(skb,
sizeof(_stph),
148 sizeof(_stpc), &_stpc);
151 return ebt_filter_config(info, st);
159 const uint8_t bridge_ula[6] = {0x01, 0x80, 0xc2, 0x00, 0x00, 0x00};
160 const uint8_t msk[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
167 if (!ether_addr_equal(e->
destmac, bridge_ula) ||
179 .checkentry = ebt_stp_mt_check,
184 static int __init ebt_stp_init(
void)
189 static void __exit ebt_stp_fini(
void)