]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/bridge/br.c
[BRIDGE]: use llc for receiving STP packets
[mirror_ubuntu-bionic-kernel.git] / net / bridge / br.c
index 188cc1ac49eb76ab2c5c806cbb03a406a3c59bf7..22d806cf40caf86d694eb05f2794bc1454c5ee19 100644 (file)
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/init.h>
+#include <linux/llc.h>
+#include <net/llc.h>
 
 #include "br_private.h"
 
 int (*br_should_route_hook) (struct sk_buff **pskb) = NULL;
 
+static struct llc_sap *br_stp_sap;
+
 static int __init br_init(void)
 {
+       br_stp_sap = llc_sap_open(LLC_SAP_BSPAN, br_stp_rcv);
+       if (!br_stp_sap) {
+               printk(KERN_ERR "bridge: can't register sap for STP\n");
+               return -EBUSY;
+       }
+
        br_fdb_init();
 
 #ifdef CONFIG_BRIDGE_NETFILTER
@@ -45,6 +55,8 @@ static int __init br_init(void)
 
 static void __exit br_deinit(void)
 {
+       llc_sap_close(br_stp_sap);
+
 #ifdef CONFIG_BRIDGE_NETFILTER
        br_netfilter_fini();
 #endif