--- zzzz-none-000/linux-4.4.271/net/bridge/br.c 2021-06-03 06:22:09.000000000 +0000 +++ hawkeye-5590-750/linux-4.4.271/net/bridge/br.c 2023-04-19 10:22:30.000000000 +0000 @@ -190,6 +190,7 @@ int err; BUILD_BUG_ON(sizeof(struct br_input_skb_cb) > FIELD_SIZEOF(struct sk_buff, cb)); + BUILD_BUG_ON(sizeof(struct br_output_skb_cb) > FIELD_SIZEOF(struct sk_buff, cb)); err = stp_proto_register(&br_stp_proto); if (err < 0) { @@ -223,6 +224,10 @@ brioctl_set(br_ioctl_deviceless_stub); + err = br_flood_rl_init(); + if (err) + goto err_out6; + #if IS_ENABLED(CONFIG_ATM_LANE) br_fdb_test_addr_hook = br_fdb_test_addr; #endif @@ -233,6 +238,8 @@ return 0; +err_out6: + br_netlink_fini(); err_out5: unregister_switchdev_notifier(&br_switchdev_notifier); err_out4: @@ -251,6 +258,7 @@ static void __exit br_deinit(void) { stp_proto_unregister(&br_stp_proto); + br_flood_rl_fini(); br_netlink_fini(); unregister_switchdev_notifier(&br_switchdev_notifier); unregister_netdevice_notifier(&br_device_notifier); @@ -266,6 +274,10 @@ br_fdb_fini(); } +/* Hook for bridge event notifications */ +br_notify_hook_t __rcu *br_notify_hook __read_mostly; +EXPORT_SYMBOL_GPL(br_notify_hook); + module_init(br_init) module_exit(br_deinit) MODULE_LICENSE("GPL");