create batman-adv interfaces with netlink v2
Hi folks,
here the updated patchset conceived by Sven Eckelmann for netlink interface creation. Since the first version the following has happened:
* the code has been rebased on top of master
* batadv_add_slave() / batadv_del_slave() / batadv_interface_free() were
renamed to follow general naming conventions
* introduced batadv_softif_destroy_netlink() dedicated to netlink deletion
* adding clear name separation between batadv_softif_init_early() /batadv_softif_init_late()
Apparently, busybox "ip link" does not support creating interfaces through netlink which is why I was unable to actually test the code in my OpenWrt environments. If any if you know a way of making this work on OpenWrt or are brave enough to run the code natively I'd be interested in getting feedback on whether or not this works. I am certain the code was bug free and ran perfectly fine before I touched it. :)
Cheers,
Marek
PATCH v2 1/6 batman-adv: Move soft-interface initialization to ndo_init
From: Sven Eckelmann <[email protected]>
The initialization of an net_device object should be done in the init/constructor function and not from the outside after the register_netdevice was done to avoid race conditions.
--- hard-interface.c | 5 ++ soft-interface.c | 167 ++++++++++++++++++++++++++---------------------------- 2 files changed, 85 insertions(+), 87 deletions(-)
hard-interface.c +5 -0
@@ -563,6 +563,11 @@ static int batadv_hard_if_event(struct notifier_block *this,struct batadv_hard_iface *primary_if =NULL ;struct batadv_priv *bat_priv; +if (batadv_softif_is_valid (net_dev) && event ==NETDEV_REGISTER ) { +batadv_sysfs_add_meshif (net_dev); +return NOTIFY_DONE ; + } + hard_iface =batadv_hardif_get_by_netdev (net_dev);if (!hard_iface && event ==NETDEV_REGISTER ) hard_iface =batadv_hardif_add_interface (net_dev);
soft-interface.c +80 -87
207 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH v2 2/6 batman-adv: Move deinitialization of soft-interface to destructor
From: Sven Eckelmann <[email protected]>
The deinitialization of the soft-interface created in ndo_init/constructor should be done in the destructor and not directly before calling unregister_netdevice
--- soft-interface.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
soft-interface.c +12 -3
@@ -416,7 +416,6 @@ static void batadv_softif_destroy_finish(struct work_struct *work) cleanup_work); soft_iface = bat_priv->soft_iface; -batadv_debugfs_del_meshif (soft_iface);batadv_sysfs_del_meshif (soft_iface);rtnl_lock ();
@@ -519,6 +518,17 @@ static const struct net_device_ops batadv_netdev_ops = { };/** +* batadv_softif_free - Deconstructor of batadv_soft_interface +* @dev: Device to cleanup and remove +*/ +static void batadv_softif_free (struct net_device *dev) +{ +batadv_debugfs_del_meshif (dev); +batadv_mesh_free (dev); +free_netdev (dev); +} + +/** * batadv_softif_init_early - early stage initialization of soft interface * @dev: registered network device to modify */
@@ -529,7 +539,7 @@ static void batadv_softif_init_early(struct net_device *dev)ether_setup (dev); dev->netdev_ops = &batadv_netdev_ops; - dev->destructor = free_netdev; + dev->destructor = batadv_softif_free; dev->tx_queue_len =0 ;/* can't call min_mtu, because the needed variables
@@ -572,7 +582,6 @@ void batadv_softif_destroy(struct net_device *soft_iface) {struct batadv_priv *bat_priv =netdev_priv (soft_iface); -batadv_mesh_free (soft_iface);queue_work (batadv_event_workqueue, &bat_priv->cleanup_work); }
Signature · 1 line
1.7.10.4
PATCH v2 3/6 batman-adv: Don't always delete softif when last slave was removed
In reply to Marek LindnerFrom: Sven Eckelmann <[email protected]>
batman-adv has an unusual way to manage softinterfaces. These will be created automatically when a user writes to the batman-adv/mesh_iface file in sysfs and removed when no slave device exists anymore.
This behaviour cannot be changed without breaking compatibility with existing code. Instead other interfaces should be able to slightly reduce this behaviour and provide a more common reaction to a removal of a slave interface.
--- hard-interface.c | 8 +++++--- hard-interface.h | 13 ++++++++++++- sysfs.c | 6 ++++-- 3 files changed, 21 insertions(+), 6 deletions(-)
hard-interface.c +5 -3
@@ -408,7 +408,8 @@ err:return ret; } -void batadv_hardif_disable_interface (struct batadv_hard_iface *hard_iface) +void batadv_hardif_disable_interface (struct batadv_hard_iface *hard_iface, +enum batadv_hard_if_cleanup autodel) {struct batadv_priv *bat_priv =netdev_priv (hard_iface->soft_iface);struct batadv_hard_iface *primary_if =NULL ;
@@ -446,7 +447,7 @@ void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface)dev_put (hard_iface->soft_iface);/* nobody uses this interface anymore */ -if (!bat_priv->num_ifaces) +if (!bat_priv->num_ifaces && autodel ==BATADV_IF_CLEANUP_AUTO )batadv_softif_destroy (hard_iface->soft_iface); hard_iface->soft_iface =NULL ;
@@ -533,7 +534,8 @@ static void batadv_hardif_remove_interface(struct batadv_hard_iface *hard_iface)/* first deactivate interface */ if (hard_iface->if_status !=BATADV_IF_NOT_IN_USE ) -batadv_hardif_disable_interface (hard_iface); +batadv_hardif_disable_interface (hard_iface, +BATADV_IF_CLEANUP_AUTO );if (hard_iface->if_status !=BATADV_IF_NOT_IN_USE )return ;
hard-interface.h +12 -1
@@ -29,13 +29,24 @@ enum batadv_hard_if_state { BATADV_IF_I_WANT_YOU, }; +/** +* enum batadv_hard_if_cleanup - Cleanup modi for soft_iface after slave removal +* @BATADV_IF_CLEANUP_KEEP: Don't automatically delete soft-interface +* @BATADV_IF_CLEANUP_AUTO: Delete soft-interface after last slave was removed +*/ +enum batadv_hard_if_cleanup { +BATADV_IF_CLEANUP_KEEP , +BATADV_IF_CLEANUP_AUTO , +}; +extern struct notifier_block batadv_hard_if_notifier;struct batadv_hard_iface *batadv_hardif_get_by_netdev (const struct net_device *net_dev);int batadv_hardif_enable_interface (struct batadv_hard_iface *hard_iface,const char *iface_name); -void batadv_hardif_disable_interface (struct batadv_hard_iface *hard_iface); +void batadv_hardif_disable_interface (struct batadv_hard_iface *hard_iface, +enum batadv_hard_if_cleanup autodel);void batadv_hardif_remove_interfaces (void );int batadv_hardif_min_mtu (struct net_device *soft_iface);void batadv_update_min_mtu (struct net_device *soft_iface);
sysfs.c +4 -2
@@ -582,13 +582,15 @@ static ssize_t batadv_store_mesh_iface(struct kobject *kobj, }if (status_tmp ==BATADV_IF_NOT_IN_USE ) { -batadv_hardif_disable_interface (hard_iface); +batadv_hardif_disable_interface (hard_iface, +BATADV_IF_CLEANUP_AUTO ); goto unlock; }/* if the interface already is in use */ if (hard_iface->if_status !=BATADV_IF_NOT_IN_USE ) -batadv_hardif_disable_interface (hard_iface); +batadv_hardif_disable_interface (hard_iface, +BATADV_IF_CLEANUP_AUTO ); ret =batadv_hardif_enable_interface (hard_iface, buff);
Signature · 1 line
1.7.10.4
PATCH v2 4/6 batman-adv: rename batadv_softif_destroy to reflect sysfs use case
In reply to Marek LindnerFrom: Sven Eckelmann <[email protected]>
--- hard-interface.c | 2 +- soft-interface.c | 6 +++++- soft-interface.h | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-)
hard-interface.c +1 -1
@@ -448,7 +448,7 @@ void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface,/* nobody uses this interface anymore */ if (!bat_priv->num_ifaces && autodel ==BATADV_IF_CLEANUP_AUTO ) -batadv_softif_destroy (hard_iface->soft_iface); +batadv_softif_destroy_sysfs (hard_iface->soft_iface); hard_iface->soft_iface =NULL ;batadv_hardif_free_ref (hard_iface);
soft-interface.c +5 -1
@@ -578,7 +578,11 @@ struct net_device *batadv_softif_create(const char *name)return soft_iface; } -void batadv_softif_destroy (struct net_device *soft_iface) +/** +* batadv_softif_destroy_sysfs - deletion of batadv_soft_interface via sysfs +* @soft_iface: the to-be-removed batman-adv interface +*/ +void batadv_softif_destroy_sysfs (struct net_device *soft_iface) {struct batadv_priv *bat_priv =netdev_priv (soft_iface);
soft-interface.h +1 -1
@@ -25,7 +25,7 @@ void batadv_interface_rx(struct net_device *soft_iface, struct sk_buff *skb, struct batadv_hard_iface *recv_if, int hdr_size, struct batadv_orig_node *orig_node);struct net_device *batadv_softif_create (const char *name); -void batadv_softif_destroy (struct net_device *soft_iface); +void batadv_softif_destroy_sysfs (struct net_device *soft_iface);int batadv_softif_is_valid (const struct net_device *net_dev);#endif /* _NET_BATMAN_ADV_SOFT_INTERFACE_H_ */
Signature · 1 line
1.7.10.4
PATCH v2 5/6 batman-adv: Allow to use rntl_link for device creation/deletion
In reply to Marek LindnerFrom: Sven Eckelmann <[email protected]>
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
--- main.c | 2 ++ main.h | 1 + soft-interface.c | 29 +++++++++++++++++++++++++++++ soft-interface.h | 1 + 4 files changed, 33 insertions(+)
main.c +2 -0
@@ -70,6 +70,7 @@ static int __init batadv_init(void)batadv_debugfs_init ();register_netdevice_notifier (&batadv_hard_if_notifier); +rtnl_link_register (&batadv_link_ops);pr_info ("B.A.T.M.A.N. advanced %s (compatibility version %i) loaded\n" ,BATADV_SOURCE_VERSION ,BATADV_COMPAT_VERSION );
@@ -80,6 +81,7 @@ static int __init batadv_init(void) static void __exit batadv_exit(void) {batadv_debugfs_destroy (); +rtnl_link_unregister (&batadv_link_ops);unregister_netdevice_notifier (&batadv_hard_if_notifier);batadv_hardif_remove_interfaces ();
main.h +1 -0
@@ -150,6 +150,7 @@ enum batadv_uev_type {#include <linux/percpu.h> #include <linux/slab.h> #include <net/sock.h> /* struct sock */ +#include <net/rtnetlink.h> #include <linux/jiffies.h> #include <linux/seq_file.h> #include "compat.h"
soft-interface.c +29 -0
@@ -567,6 +567,8 @@ struct net_device *batadv_softif_create(const char *name)if (!soft_iface)return NULL ; + soft_iface->rtnl_link_ops = &batadv_link_ops; + ret =register_netdevice (soft_iface);if (ret <0 ) { pr_err("Unable to register the batman interface '%s': %i\n",
@@ -589,6 +591,26 @@ void batadv_softif_destroy_sysfs(struct net_device *soft_iface)queue_work (batadv_event_workqueue, &bat_priv->cleanup_work); } +/** +* batadv_softif_destroy_netlink - deletion of batadv_soft_interface via netlink +* @soft_iface: the to be removed batman-adv interface +* @head: list pointer +*/ +void batadv_softif_destroy_netlink (struct net_device *soft_iface, +struct list_head *head) +{ +struct batadv_hard_iface *hard_iface; + +list_for_each_entry (hard_iface, &batadv_hardif_list, list) { +if (hard_iface->soft_iface == soft_iface) +batadv_hardif_disable_interface (hard_iface, +BATADV_IF_CLEANUP_KEEP ); + } + +batadv_sysfs_del_meshif (soft_iface); +unregister_netdevice_queue (soft_iface, head); +} +int batadv_softif_is_valid (const struct net_device *net_dev) {if (net_dev->netdev_ops->ndo_start_xmit == batadv_interface_tx)
@@ -597,6 +619,13 @@ int batadv_softif_is_valid(const struct net_device *net_dev)return 0 ; } +struct rtnl_link_ops batadv_link_ops__read_mostly = { + .kind ="batadv" , + .priv_size =sizeof (struct batadv_priv ), + .setup = batadv_softif_init_early, + .dellink = batadv_softif_destroy_netlink, +}; +/* ethtool */ static int batadv_get_settings (struct net_device *dev,struct ethtool_cmd *cmd) {
soft-interface.h +1 -0
@@ -27,5 +27,6 @@ void batadv_interface_rx(struct net_device *soft_iface,struct net_device *batadv_softif_create (const char *name);void batadv_softif_destroy_sysfs (struct net_device *soft_iface);int batadv_softif_is_valid (const struct net_device *net_dev); +extern struct rtnl_link_ops batadv_link_ops;#endif /* _NET_BATMAN_ADV_SOFT_INTERFACE_H_ */
Signature · 1 line
1.7.10.4
PATCH v2 6/6 batman-adv: Allow to modify slaves of soft-interfaces through rntl_link
In reply to Marek LindnerFrom: Sven Eckelmann <[email protected]>
The sysfs configuration interface of batman-adv to add/remove slaves of an soft-iface is not deadlock free and doesn't follow the currently common way to modify slaves of an interface.
An additional configuration interface though rtnl_link is introduced which provides easy device adding/removing with tools like "ip":
$ ip link set dev eth0 master bat0 $ ip link set dev eth0 nomaster
--- soft-interface.c | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-)
soft-interface.c +38 -1
@@ -506,6 +506,41 @@ free_bat_counters:return ret; } +/** +* batadv_softif_slave_add - Add a slave interface to a batadv_soft_interface +* @dev: batadv_soft_interface used as master interface +* @slave_dev: net_device which should become the slave interface +*/ +static int batadv_softif_slave_add (struct net_device *dev, +struct net_device *slave_dev) +{ +struct batadv_hard_iface *hard_iface; + + hard_iface =batadv_hardif_get_by_netdev (slave_dev); +if (!hard_iface || hard_iface->soft_iface !=NULL ) +return -EINVAL ; + +return batadv_hardif_enable_interface (hard_iface, dev->name); +} + +/** +* batadv_softif_slave_del - Delete a slave iface from a batadv_soft_interface +* @dev: batadv_soft_interface used as master interface +* @slave_dev: net_device which should be removed from the master interface +*/ +static int batadv_softif_slave_del (struct net_device *dev, +struct net_device *slave_dev) +{ +struct batadv_hard_iface *hard_iface; + + hard_iface =batadv_hardif_get_by_netdev (slave_dev); +if (!hard_iface || hard_iface->soft_iface != dev) +return -EINVAL ; + +batadv_hardif_disable_interface (hard_iface,BATADV_IF_CLEANUP_KEEP ); +return 0 ; +} +static const struct net_device_ops batadv_netdev_ops = { .ndo_init = batadv_softif_init_late, .ndo_open = batadv_interface_open,
@@ -514,7 +549,9 @@ static const struct net_device_ops batadv_netdev_ops = { .ndo_set_mac_address = batadv_interface_set_mac_addr, .ndo_change_mtu = batadv_interface_change_mtu, .ndo_start_xmit = batadv_interface_tx, - .ndo_validate_addr = eth_validate_addr + .ndo_validate_addr = eth_validate_addr, + .ndo_add_slave = batadv_softif_slave_add, + .ndo_del_slave = batadv_softif_slave_del, };/**
Signature · 1 line
1.7.10.4
Quoted 5 lines · On Sunday 13 January 2013 17:50:39 Marek Lindner wrote:
Apparently, busybox "ip link" does not support creating interfaces through netlink which is why I was unable to actually test the code in my OpenWrt environments. If any if you know a way of making this work on OpenWrt or are brave enough to run the code natively I'd be interested in getting feedback on whether or not this works.
https://dev.openwrt.org/browser/trunk/package/network/utils/iproute2
Kind regards,
Sven
Quoted 8 lines · On Sunday, January 13, 2013 18:00:49 Sven Eckelmann wrote:
Quoted 5 lines · On Sunday 13 January 2013 17:50:39 Marek Lindner wrote:
Apparently, busybox "ip link" does not support creating interfaces through netlink which is why I was unable to actually test the code in my OpenWrt environments. If any if you know a way of making this work on OpenWrt or are brave enough to run the code natively I'd be interested in getting feedback on whether or not this works.
https://dev.openwrt.org/browser/trunk/package/network/utils/iproute2
Thanks! That works for me.
Cheers,
Marek
Re: [B.A.T.M.A.N.] [PATCHv2 6/6] batman-adv: Allow to modify slaves of soft-interfaces through rntl_link
In reply to Marek LindnerQuoted 6 lines · On Sunday 13 January 2013 17:51:03 Marek Lindner wrote:
From: Sven Eckelmann <[email protected]>
The sysfs configuration interface of batman-adv to add/remove slaves of an soft-iface is not deadlock free and doesn't follow the currently common way to modify slaves of an interface.
Quoted 7 lines
An additional configuration interface though
rtnl_linkis introduced which provides easy device adding/removing with tools like "ip":$ ip link set dev eth0 master bat0 $ ip link set dev eth0 nomasterSigned-off-by Sven Eckelmann <[email protected]>---
Master setting is missing. This is necessary on current kernels to use "nomaster" of ip. Also reference counting is br0ken. An example patch is added (just to explain things... it will not apply directly).
Kind regards,
Sven
hard-interface.c +12 -2
@@ -349,9 +349,16 @@ int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface, hard_iface->soft_iface = soft_iface; bat_priv =netdev_priv (hard_iface->soft_iface); + ret =netdev_set_master (hard_iface->net_dev, hard_iface->soft_iface); +if (ret) { +batadv_err (hard_iface->soft_iface, +"Device %s failed to set master\n" , iface_name); + goto err_dev; + } + ret = bat_priv->bat_algo_ops->bat_iface_enable (hard_iface);if (ret <0 ) - goto err_dev; + goto err_enable; hard_iface->if_num = bat_priv->num_ifaces; bat_priv->num_ifaces++;
@@ -361,7 +368,7 @@ int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface, bat_priv->bat_algo_ops->bat_iface_disable (hard_iface); bat_priv->num_ifaces--; hard_iface->if_status =BATADV_IF_NOT_IN_USE ; - goto err_dev; + goto err_enable; } hard_iface->batman_adv_ptype.type = ethertype;
@@ -400,6 +407,8 @@ int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface, out:return 0 ; +err_enable: +netdev_set_master (hard_iface->net_dev,NULL ); err_dev:dev_put (soft_iface); err:
@@ -450,6 +459,7 @@ void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface,batadv_softif_destroy (hard_iface->soft_iface,NULL ); hard_iface->soft_iface =NULL ; +netdev_set_master (hard_iface->net_dev,NULL );batadv_hardif_free_ref (hard_iface); out:
soft-interface.c +5 -1
@@ -486,12 +486,15 @@ static int batadv_add_slave(struct net_device *dev, struct net_device *slave_dev) {struct batadv_hard_iface *hard_iface; +int ret; hard_iface =batadv_hardif_get_by_netdev (slave_dev);if (!hard_iface || hard_iface->soft_iface !=NULL )return -EINVAL ; -return batadv_hardif_enable_interface (hard_iface, dev->name); + ret =batadv_hardif_enable_interface (hard_iface, dev->name); +batadv_hardif_free_ref (hard_iface); +return ret; }/**
@@ -509,6 +512,7 @@ static int batadv_del_slave(struct net_device *dev,return -EINVAL ;batadv_hardif_disable_interface (hard_iface,BATADV_IF_CLEANUP_KEEP ); +batadv_hardif_free_ref (hard_iface);return 0 ; }
[B.A.T.M.A.N.] [FIX] batman-adv: fix master setting in rtnl interface
To be merged with ("batman-adv: Allow to modify slaves of soft-interfaces through rntl_link")
---
Sven: I think this is enough to account the correct "master" setting? In net-next it is now called upper_device and they also changed some api. Therefore a compat solution is also provided.
Cheers,
compat.h | 2 ++ hard-interface.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-)
compat.h +2 -0
@@ -211,6 +211,8 @@ static int batadv_interface_set_mac_addr(struct net_device *dev, void *p) \ }\ static int __batadv_interface_set_mac_addr(x, y) +#define netdev_master_upper_dev_link netdev_set_master +#endif /* < KERNEL_VERSION(3, 9, 0) */ #endif /* _NET_BATMAN_ADV_COMPAT_H_ */
hard-interface.c +5 -1
@@ -313,7 +313,7 @@ int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface,struct batadv_priv *bat_priv;struct net_device *soft_iface;__be16 ethertype =__constant_htons (ETH_P_BATMAN ); -int ret; +int ret =0 ;if (hard_iface->if_status !=BATADV_IF_NOT_IN_USE ) goto out;
@@ -398,6 +398,10 @@ int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface,/* begin scheduling originator messages on that interface */ batadv_schedule_bat_ogm (hard_iface); + ret =netdev_master_upper_dev_link (hard_iface->net_dev, soft_iface); +if (ret) + goto err_dev; + out:return 0 ;
Signature · 1 line
1.8.1.2
Re: [B.A.T.M.A.N.] [FIX] batman-adv: fix master setting in rtnl interface
hard-interface.c int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface, · line 316
Quoted 10 lines · Antonio Quartulli
hard-interface.c +1
-1@@ -313,7 +313,7 @@ int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface,struct batadv_priv *bat_priv;struct net_device *soft_iface;__be16 ethertype =__constant_htons (ETH_P_BATMAN ); -int ret; +int ret =0 ;
mh, maybe this is not really needed.
Cheers,
Signature · 4 lines
Antonio Quartulli ..each of us alone is worth nothing.. Ernesto "Che" Guevara
[B.A.T.M.A.N.] [FIXv2] batman-adv: fix master setting in rtnl interface
In reply to Antonio QuartulliTo be merged with ("batman-adv: Allow to modify slaves of soft-interfaces through rntl_link")
---
v2:
- ndo_del_slave() also have to unset the master/upper_dev device
compat.h | 3 +++ hard-interface.c | 5 +++++ 2 files changed, 8 insertions(+)
compat.h +3 -0
@@ -211,6 +211,9 @@ static int batadv_interface_set_mac_addr(struct net_device *dev, void *p) \ }\ static int __batadv_interface_set_mac_addr(x, y) +#define netdev_master_upper_dev_link netdev_set_master +#define netdev_upper_dev_unlink (slave, master) netdev_set_master(slave, NULL) +#endif /* < KERNEL_VERSION(3, 9, 0) */ #endif /* _NET_BATMAN_ADV_COMPAT_H_ */
hard-interface.c +5 -0
@@ -398,6 +398,10 @@ int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface,/* begin scheduling originator messages on that interface */ batadv_schedule_bat_ogm (hard_iface); + ret =netdev_master_upper_dev_link (hard_iface->net_dev, soft_iface); +if (ret) + goto err_dev; + out:return 0 ;
@@ -450,6 +454,7 @@ void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface,if (!bat_priv->num_ifaces && autodel ==BATADV_IF_CLEANUP_AUTO )batadv_softif_destroy_sysfs (hard_iface->soft_iface); +netdev_upper_dev_unlink (hard_iface->net_dev, hard_iface->soft_iface); hard_iface->soft_iface =NULL ;batadv_hardif_free_ref (hard_iface);
Signature · 1 line
1.8.1.2
Re: [B.A.T.M.A.N.] [FIXv2] batman-adv: fix master setting in rtnl interface
Quoted 8 lines · On Monday, February 04, 2013 03:02:19 Antonio Quartulli wrote:
To be merged with ("batman-adv: Allow to modify slaves of soft-interfaces through
rntl_link")Signed-off-by Antonio Quartulli <[email protected]>---
v2:
-ndo_del_slave()also have to unset the master/upper_dev device
Did you actually test the stuff you are proposing ?? batctl if del <iface> results in a kernel crash ...
Cheers,
Marek
Re: [B.A.T.M.A.N.] [FIXv2] batman-adv: fix master setting in rtnl interface
Quoted 4 lines · Marek Lindner
Quoted 3 lines · On Monday, February 04, 2013 03:02:19 Antonio Quartulli wrote:
To be merged with ("batman-adv: Allow to modify slaves of soft-interfaces through
rntl_link")
Quoted 8 lines
Quoted 5 lines
Signed-off-by Antonio Quartulli <[email protected]>---
v2:
-ndo_del_slave()also have to unset the master/upper_dev deviceDid you actually test the stuff you are proposing ?? batctl if del <iface> results in a kernel crash ...
Well, since I do run batman-adv against net-next, I could not test the compat stuff and I left this exercise to you :-) The problem seems to be there....I'll try to dig and see if I can how to fix it.
Cheers,
Signature · 4 lines
Antonio Quartulli ..each of us alone is worth nothing.. Ernesto "Che" Guevara