summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/bat_v.c
diff options
context:
space:
mode:
authorMarek Lindner <mareklindner@neomailbox.ch>2016-05-07 19:54:17 +0800
committerAntonio Quartulli <a@unstable.cc>2016-05-18 11:49:44 +0800
commitebe24cea95ab969f76f2922032f6c390fdc816f2 (patch)
tree74a7b66238dd55bed64c3d3f7815c3642ddd7382 /net/batman-adv/bat_v.c
parente123705e58bf171be8c6eb0902ebfb5d6ed255ad (diff)
downloadblackbird-op-linux-ebe24cea95ab969f76f2922032f6c390fdc816f2.tar.gz
blackbird-op-linux-ebe24cea95ab969f76f2922032f6c390fdc816f2.zip
batman-adv: initialize ELP orig address on secondary interfaces
This fix prevents nodes to wrongly create a 00:00:00:00:00:00 originator which can potentially interfere with the rest of the neighbor statistics. Fixes: d6f94d91f766 ("batman-adv: ELP - adding basic infrastructure") Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc>
Diffstat (limited to 'net/batman-adv/bat_v.c')
-rw-r--r--net/batman-adv/bat_v.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/batman-adv/bat_v.c b/net/batman-adv/bat_v.c
index 31bc57e2a944..0a12e5cdd65d 100644
--- a/net/batman-adv/bat_v.c
+++ b/net/batman-adv/bat_v.c
@@ -40,6 +40,16 @@
static void batadv_v_iface_activate(struct batadv_hard_iface *hard_iface)
{
+ struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface);
+ struct batadv_hard_iface *primary_if;
+
+ primary_if = batadv_primary_if_get_selected(bat_priv);
+
+ if (primary_if) {
+ batadv_v_elp_iface_activate(primary_if, hard_iface);
+ batadv_hardif_put(primary_if);
+ }
+
/* B.A.T.M.A.N. V does not use any queuing mechanism, therefore it can
* set the interface as ACTIVE right away, without any risk of race
* condition
OpenPOWER on IntegriCloud