diff options
| author | David S. Miller <davem@davemloft.net> | 2015-12-05 17:41:42 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-12-05 17:41:42 -0500 |
| commit | 857e8a6765d6463dda9b4ffd53cb2663b15ae939 (patch) | |
| tree | a429c324efd573280e1e40c54146f5fc072ea2dc /net | |
| parent | Merge branch 'qmi_wwan_MDM9x30' (diff) | |
| parent | batman-adv: Act on NETDEV_*_TYPE_CHANGE events (diff) | |
| download | linux-857e8a6765d6463dda9b4ffd53cb2663b15ae939.tar.gz linux-857e8a6765d6463dda9b4ffd53cb2663b15ae939.zip | |
Merge branch 'batman-hdlc'
Andrew Lunn says:
====================
Allow BATMAN to use hdlc-eth interfaces
BATMAN works over Ethernet like interfaces. hdlc-eth provides the need
requirements. However, hdlc devices are often created as raw hdlc
devices, which batman cannot use, and are then be transmuted into
other types using sethdlc(1). Have the HDLC code emit
NETDEV_*_TYPE_CHANGE events when the type changes, and have BATMAN
react on these events.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
| -rw-r--r-- | net/batman-adv/hard-interface.c | 4 | ||||
| -rw-r--r-- | net/ipv6/addrconf.c | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c index aa8867e1d983..a58184fdf5fd 100644 --- a/net/batman-adv/hard-interface.c +++ b/net/batman-adv/hard-interface.c @@ -709,7 +709,8 @@ static int batadv_hard_if_event(struct notifier_block *this, } hard_iface = batadv_hardif_get_by_netdev(net_dev); - if (!hard_iface && event == NETDEV_REGISTER) + if (!hard_iface && (event == NETDEV_REGISTER || + event == NETDEV_POST_TYPE_CHANGE)) hard_iface = batadv_hardif_add_interface(net_dev); if (!hard_iface) @@ -724,6 +725,7 @@ static int batadv_hard_if_event(struct notifier_block *this, batadv_hardif_deactivate_interface(hard_iface); break; case NETDEV_UNREGISTER: + case NETDEV_PRE_TYPE_CHANGE: list_del_rcu(&hard_iface->list); batadv_hardif_remove_interface(hard_iface); diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 6936d0d8c6b1..5e9111da449d 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -3287,7 +3287,8 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, case NETDEV_PRE_TYPE_CHANGE: case NETDEV_POST_TYPE_CHANGE: - addrconf_type_change(dev, event); + if (idev) + addrconf_type_change(dev, event); break; } |
