macvlan.c (bd45ac0c5daae35e7c71138172e63df5cf644cf6) | macvlan.c (52913246e0056c9c6215a778a3b31b6b9ce5c3ef) |
---|---|
1/* 2 * Copyright (c) 2007 Patrick McHardy <kaber@trash.net> 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License as 6 * published by the Free Software Foundation; either version 2 of 7 * the License, or (at your option) any later version. 8 * --- 494 unchanged lines hidden (view full) --- 503 register_netdevice_notifier(&macvlan_notifier_block); 504 macvlan_handle_frame_hook = macvlan_handle_frame; 505 506 err = rtnl_link_register(&macvlan_link_ops); 507 if (err < 0) 508 goto err1; 509 return 0; 510err1: | 1/* 2 * Copyright (c) 2007 Patrick McHardy <kaber@trash.net> 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License as 6 * published by the Free Software Foundation; either version 2 of 7 * the License, or (at your option) any later version. 8 * --- 494 unchanged lines hidden (view full) --- 503 register_netdevice_notifier(&macvlan_notifier_block); 504 macvlan_handle_frame_hook = macvlan_handle_frame; 505 506 err = rtnl_link_register(&macvlan_link_ops); 507 if (err < 0) 508 goto err1; 509 return 0; 510err1: |
511 macvlan_handle_frame_hook = macvlan_handle_frame; | 511 macvlan_handle_frame_hook = NULL; |
512 unregister_netdevice_notifier(&macvlan_notifier_block); 513 return err; 514} 515 516static void __exit macvlan_cleanup_module(void) 517{ 518 rtnl_link_unregister(&macvlan_link_ops); 519 macvlan_handle_frame_hook = NULL; 520 unregister_netdevice_notifier(&macvlan_notifier_block); 521} 522 523module_init(macvlan_init_module); 524module_exit(macvlan_cleanup_module); 525 526MODULE_LICENSE("GPL"); 527MODULE_AUTHOR("Patrick McHardy <kaber@trash.net>"); 528MODULE_DESCRIPTION("Driver for MAC address based VLANs"); 529MODULE_ALIAS_RTNL_LINK("macvlan"); | 512 unregister_netdevice_notifier(&macvlan_notifier_block); 513 return err; 514} 515 516static void __exit macvlan_cleanup_module(void) 517{ 518 rtnl_link_unregister(&macvlan_link_ops); 519 macvlan_handle_frame_hook = NULL; 520 unregister_netdevice_notifier(&macvlan_notifier_block); 521} 522 523module_init(macvlan_init_module); 524module_exit(macvlan_cleanup_module); 525 526MODULE_LICENSE("GPL"); 527MODULE_AUTHOR("Patrick McHardy <kaber@trash.net>"); 528MODULE_DESCRIPTION("Driver for MAC address based VLANs"); 529MODULE_ALIAS_RTNL_LINK("macvlan"); |