Commit 2c377b5a authored by David S. Miller's avatar David S. Miller

Merge tag 'batadv-net-for-davem-20190627' of git://git.open-mesh.org/linux-merge

Simon Wunderlich says:

====================
Here are some batman-adv bugfixes:

 - fix a leaked TVLV handler which wasn't unregistered, by Jeremy Sowden

 - fix duplicated OGMs when interfaces are set UP, by Sven Eckelmann
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents e78557ba 9e6b5648
...@@ -2337,7 +2337,7 @@ batadv_iv_ogm_neigh_is_sob(struct batadv_neigh_node *neigh1, ...@@ -2337,7 +2337,7 @@ batadv_iv_ogm_neigh_is_sob(struct batadv_neigh_node *neigh1,
return ret; return ret;
} }
static void batadv_iv_iface_activate(struct batadv_hard_iface *hard_iface) static void batadv_iv_iface_enabled(struct batadv_hard_iface *hard_iface)
{ {
/* begin scheduling originator messages on that interface */ /* begin scheduling originator messages on that interface */
batadv_iv_ogm_schedule(hard_iface); batadv_iv_ogm_schedule(hard_iface);
...@@ -2683,8 +2683,8 @@ static void batadv_iv_gw_dump(struct sk_buff *msg, struct netlink_callback *cb, ...@@ -2683,8 +2683,8 @@ static void batadv_iv_gw_dump(struct sk_buff *msg, struct netlink_callback *cb,
static struct batadv_algo_ops batadv_batman_iv __read_mostly = { static struct batadv_algo_ops batadv_batman_iv __read_mostly = {
.name = "BATMAN_IV", .name = "BATMAN_IV",
.iface = { .iface = {
.activate = batadv_iv_iface_activate,
.enable = batadv_iv_ogm_iface_enable, .enable = batadv_iv_ogm_iface_enable,
.enabled = batadv_iv_iface_enabled,
.disable = batadv_iv_ogm_iface_disable, .disable = batadv_iv_ogm_iface_disable,
.update_mac = batadv_iv_ogm_iface_update_mac, .update_mac = batadv_iv_ogm_iface_update_mac,
.primary_set = batadv_iv_ogm_primary_iface_set, .primary_set = batadv_iv_ogm_primary_iface_set,
......
...@@ -795,6 +795,9 @@ int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface, ...@@ -795,6 +795,9 @@ int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface,
batadv_hardif_recalc_extra_skbroom(soft_iface); batadv_hardif_recalc_extra_skbroom(soft_iface);
if (bat_priv->algo_ops->iface.enabled)
bat_priv->algo_ops->iface.enabled(hard_iface);
out: out:
return 0; return 0;
......
...@@ -3813,6 +3813,8 @@ static void batadv_tt_purge(struct work_struct *work) ...@@ -3813,6 +3813,8 @@ static void batadv_tt_purge(struct work_struct *work)
*/ */
void batadv_tt_free(struct batadv_priv *bat_priv) void batadv_tt_free(struct batadv_priv *bat_priv)
{ {
batadv_tvlv_handler_unregister(bat_priv, BATADV_TVLV_ROAM, 1);
batadv_tvlv_container_unregister(bat_priv, BATADV_TVLV_TT, 1); batadv_tvlv_container_unregister(bat_priv, BATADV_TVLV_TT, 1);
batadv_tvlv_handler_unregister(bat_priv, BATADV_TVLV_TT, 1); batadv_tvlv_handler_unregister(bat_priv, BATADV_TVLV_TT, 1);
......
...@@ -2129,6 +2129,9 @@ struct batadv_algo_iface_ops { ...@@ -2129,6 +2129,9 @@ struct batadv_algo_iface_ops {
/** @enable: init routing info when hard-interface is enabled */ /** @enable: init routing info when hard-interface is enabled */
int (*enable)(struct batadv_hard_iface *hard_iface); int (*enable)(struct batadv_hard_iface *hard_iface);
/** @enabled: notification when hard-interface was enabled (optional) */
void (*enabled)(struct batadv_hard_iface *hard_iface);
/** @disable: de-init routing info when hard-interface is disabled */ /** @disable: de-init routing info when hard-interface is disabled */
void (*disable)(struct batadv_hard_iface *hard_iface); void (*disable)(struct batadv_hard_iface *hard_iface);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment