* [B.A.T.M.A.N.] [PATCH next] batman-adv: make sure ELP/OGM orig MAC is updated on address change
@ 2016-05-01 17:36 Antonio Quartulli
2016-05-01 20:59 ` Antonio Quartulli
2016-05-01 21:23 ` [B.A.T.M.A.N.] [PATCH maint v2] " Antonio Quartulli
0 siblings, 2 replies; 4+ messages in thread
From: Antonio Quartulli @ 2016-05-01 17:36 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Antonio Quartulli
When the MAC address of the primary interface is changed,
update the originator address in the ELP and OGM skb buffers as
well in order to reflect the change.
Reported-by: Marek Lindner <marek@neomailbox.ch>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
---
net/batman-adv/bat_v.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/net/batman-adv/bat_v.c b/net/batman-adv/bat_v.c
index 3ff8bd1..554ccd5 100644
--- a/net/batman-adv/bat_v.c
+++ b/net/batman-adv/bat_v.c
@@ -72,16 +72,27 @@ static void batadv_v_iface_disable(struct batadv_hard_iface *hard_iface)
batadv_v_elp_iface_disable(hard_iface);
}
-static void batadv_v_iface_update_mac(struct batadv_hard_iface *hard_iface)
-{
-}
-
static void batadv_v_primary_iface_set(struct batadv_hard_iface *hard_iface)
{
batadv_v_elp_primary_iface_set(hard_iface);
batadv_v_ogm_primary_iface_set(hard_iface);
}
+static void batadv_v_iface_update_mac(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 != hard_iface)
+ goto out;
+
+ batadv_v_primary_iface_set(hard_iface);
+out:
+ if (primary_if)
+ batadv_hardif_put(primary_if);
+}
+
static void
batadv_v_hardif_neigh_init(struct batadv_hardif_neigh_node *hardif_neigh)
{
--
2.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [B.A.T.M.A.N.] [PATCH next] batman-adv: make sure ELP/OGM orig MAC is updated on address change
2016-05-01 17:36 [B.A.T.M.A.N.] [PATCH next] batman-adv: make sure ELP/OGM orig MAC is updated on address change Antonio Quartulli
@ 2016-05-01 20:59 ` Antonio Quartulli
2016-05-01 21:23 ` [B.A.T.M.A.N.] [PATCH maint v2] " Antonio Quartulli
1 sibling, 0 replies; 4+ messages in thread
From: Antonio Quartulli @ 2016-05-01 20:59 UTC (permalink / raw)
To: b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 442 bytes --]
On Mon, May 02, 2016 at 01:36:20AM +0800, Antonio Quartulli wrote:
> When the MAC address of the primary interface is changed,
> update the originator address in the ELP and OGM skb buffers as
> well in order to reflect the change.
actually this patch is for "maint" and still misses the Fixes tag.
>
> Reported-by: Marek Lindner <marek@neomailbox.ch>
> Signed-off-by: Antonio Quartulli <a@unstable.cc>
--
Antonio Quartulli
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [B.A.T.M.A.N.] [PATCH maint v2] batman-adv: make sure ELP/OGM orig MAC is updated on address change
2016-05-01 17:36 [B.A.T.M.A.N.] [PATCH next] batman-adv: make sure ELP/OGM orig MAC is updated on address change Antonio Quartulli
2016-05-01 20:59 ` Antonio Quartulli
@ 2016-05-01 21:23 ` Antonio Quartulli
2016-05-02 10:05 ` Marek Lindner
1 sibling, 1 reply; 4+ messages in thread
From: Antonio Quartulli @ 2016-05-01 21:23 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Antonio Quartulli
When the MAC address of the primary interface is changed,
update the originator address in the ELP and OGM skb buffers as
well in order to reflect the change.
Fixes: a4b88af77e28 ("batman-adv: ELP - adding basic infrastructure")
Reported-by: Marek Lindner <marek@neomailbox.ch>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
---
net/batman-adv/bat_v.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/net/batman-adv/bat_v.c b/net/batman-adv/bat_v.c
index 4026f19..4ed3d5e 100644
--- a/net/batman-adv/bat_v.c
+++ b/net/batman-adv/bat_v.c
@@ -72,16 +72,27 @@ static void batadv_v_iface_disable(struct batadv_hard_iface *hard_iface)
batadv_v_elp_iface_disable(hard_iface);
}
-static void batadv_v_iface_update_mac(struct batadv_hard_iface *hard_iface)
-{
-}
-
static void batadv_v_primary_iface_set(struct batadv_hard_iface *hard_iface)
{
batadv_v_elp_primary_iface_set(hard_iface);
batadv_v_ogm_primary_iface_set(hard_iface);
}
+static void batadv_v_iface_update_mac(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 != hard_iface)
+ goto out;
+
+ batadv_v_primary_iface_set(hard_iface);
+out:
+ if (primary_if)
+ batadv_hardif_put(primary_if);
+}
+
static void
batadv_v_hardif_neigh_init(struct batadv_hardif_neigh_node *hardif_neigh)
{
--
2.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-05-02 10:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-01 17:36 [B.A.T.M.A.N.] [PATCH next] batman-adv: make sure ELP/OGM orig MAC is updated on address change Antonio Quartulli
2016-05-01 20:59 ` Antonio Quartulli
2016-05-01 21:23 ` [B.A.T.M.A.N.] [PATCH maint v2] " Antonio Quartulli
2016-05-02 10:05 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox