The following commit has been merged in the merge/master branch: commit fd9fec7e93906b3109b84a3c79513944cac71b45 Merge: 45226783f60204bd76c4b6064f449a3dca3e3ed7 a636bf0b69010222ea58337d425ca9ff8ce52639 Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon May 2 21:37:28 2016 +0800
Merge branch 'maint' into next
diff --combined net/batman-adv/bat_v.c index 3ff8bd1,4547fce..728c9d1 --- a/net/batman-adv/bat_v.c +++ b/net/batman-adv/bat_v.c @@@ -72,16 -72,34 +72,34 @@@ static void batadv_v_iface_disable(stru 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); }
+ /** + * batadv_v_iface_update_mac - react to hard-interface MAC address change + * @hard_iface: the modified interface + * + * If the modified interface is the primary one, update the originator + * address in the ELP and OGM messages to reflect the new MAC address. + */ + 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) { @@@ -162,8 -180,8 +180,8 @@@ static void batadv_v_neigh_print(struc struct batadv_hard_iface *hard_iface; int batman_count = 0;
- seq_printf(seq, " %-15s %s (%11s) [%10s]\n", "Neighbor", - "last-seen", "throughput", "IF"); + seq_puts(seq, + " Neighbor last-seen ( throughput) [ IF]\n");
rcu_read_lock(); list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { @@@ -202,8 -220,9 +220,8 @@@ static void batadv_v_orig_print(struct int batman_count = 0; u32 i;
- seq_printf(seq, " %-15s %s (%11s) %17s [%10s]: %20s ...\n", - "Originator", "last-seen", "throughput", "Nexthop", - "outgoingIF", "Potential nexthops"); + seq_puts(seq, + " Originator last-seen ( throughput) Nexthop [outgoingIF]: Potential nexthops ...\n");
for (i = 0; i < hash->size; i++) { head = &hash->table[i];