diff options
author | Sven Eckelmann <sven@narfation.org> | 2013-02-11 04:10:26 -0500 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2013-03-27 05:27:34 -0400 |
commit | a4ac28c0d06a1c22138225a228d3a4eaffe9dd77 (patch) | |
tree | 22b25cf7d9ae68263b15d60f4dded639b35d93ed /net/batman-adv/main.c | |
parent | e07932ae6fb74ef707b2b27762fb0ad8aea4b55f (diff) |
batman-adv: Allow to use rntl_link for device creation/deletion
The sysfs configuration interface of batman-adv to add/remove soft-interfaces
is not deadlock free and doesn't follow the currently common way to create new
virtual interfaces.
An additional interface though rtnl_link is introduced which provides easy device
creation/deletion with tools like "ip":
$ ip link add dev bat0 type batadv
$ ip link del dev bat0
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv/main.c')
-rw-r--r-- | net/batman-adv/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c index 0495a7dc7505..62b1f89b7b4d 100644 --- a/net/batman-adv/main.c +++ b/net/batman-adv/main.c | |||
@@ -71,6 +71,7 @@ static int __init batadv_init(void) | |||
71 | batadv_debugfs_init(); | 71 | batadv_debugfs_init(); |
72 | 72 | ||
73 | register_netdevice_notifier(&batadv_hard_if_notifier); | 73 | register_netdevice_notifier(&batadv_hard_if_notifier); |
74 | rtnl_link_register(&batadv_link_ops); | ||
74 | 75 | ||
75 | pr_info("B.A.T.M.A.N. advanced %s (compatibility version %i) loaded\n", | 76 | pr_info("B.A.T.M.A.N. advanced %s (compatibility version %i) loaded\n", |
76 | BATADV_SOURCE_VERSION, BATADV_COMPAT_VERSION); | 77 | BATADV_SOURCE_VERSION, BATADV_COMPAT_VERSION); |
@@ -81,6 +82,7 @@ static int __init batadv_init(void) | |||
81 | static void __exit batadv_exit(void) | 82 | static void __exit batadv_exit(void) |
82 | { | 83 | { |
83 | batadv_debugfs_destroy(); | 84 | batadv_debugfs_destroy(); |
85 | rtnl_link_unregister(&batadv_link_ops); | ||
84 | unregister_netdevice_notifier(&batadv_hard_if_notifier); | 86 | unregister_netdevice_notifier(&batadv_hard_if_notifier); |
85 | batadv_hardif_remove_interfaces(); | 87 | batadv_hardif_remove_interfaces(); |
86 | 88 | ||