On Thursday 20 September 2012 14:56:13 Def wrote:
Into function interface_set_mac_addr, the function tt_local_add was invoked before updating dev->dev_addr. The new MAC address was not tagged as NoPurge.
Signed-off-by: Def def@laposte.net
soft-interface.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/soft-interface.c b/soft-interface.c index cf26e41..1345b86 --- a/soft-interface.c +++ b/soft-interface.c @@ -100,18 +100,21 @@ static int batadv_interface_set_mac_addr(struct net_device *dev, void *p) { struct batadv_priv *bat_priv = netdev_priv(dev); struct sockaddr *addr = p;
uint8_t old_addr[ETH_ALEN];
if (!is_valid_ether_addr(addr->sa_data)) return -EADDRNOTAVAIL;
memcpy(old_addr, dev->dev_addr, ETH_ALEN);
memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
/* only modify transtable if it has been initialized before */ if (atomic_read(&bat_priv->mesh_state) == BATADV_MESH_ACTIVE) {
batadv_tt_local_remove(bat_priv, dev->dev_addr,
batadv_tt_local_add(dev, addr->sa_data, BATADV_NULL_IFINDEX); }batadv_tt_local_remove(bat_priv, old_addr, "mac address changed", false);
- memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
- dev->addr_assign_type &= ~NET_ADDR_RANDOM; return 0;
}
Your patch is malformed:
Applying: batman-adv: Fix change mac address of soft iface. fatal: corrupt patch at line 10 Patch failed at 0001 batman-adv: Fix change mac address of soft iface. When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort".
Please use a mailer that doesn't eat the patch. For more information read http://os1a.cs.columbia.edu/lxr/source/Documentation/email-clients.txt
I personally prefer to use git-send-email with msmtp
Kind regards, Sven