Skip to content

Commit

Permalink
[teamd]: Update hwaddr_orig unconditionally. (#2254)
Browse files Browse the repository at this point in the history
SONiC uses same mac address for both phy ports and LAGs
  • Loading branch information
pavel-shirshov authored and lguohan committed Nov 14, 2018
1 parent 8e28cd1 commit cc6e6b5
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/libteam/0005-libteam-Add-warm_reboot-mode.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
diff --git a/libteam/ifinfo.c b/libteam/ifinfo.c
index 72155ae..44de4ca 100644
--- a/libteam/ifinfo.c
+++ b/libteam/ifinfo.c
@@ -105,15 +105,13 @@ static void update_hwaddr(struct team_ifinfo *ifinfo, struct rtnl_link *link)
hwaddr_len = nl_addr_get_len(nl_addr);
if (ifinfo->hwaddr_len != hwaddr_len) {
ifinfo->hwaddr_len = hwaddr_len;
- if (!ifinfo->master_ifindex)
- ifinfo->orig_hwaddr_len = hwaddr_len;
+ ifinfo->orig_hwaddr_len = hwaddr_len;
set_changed(ifinfo, CHANGED_HWADDR_LEN);
}
hwaddr = nl_addr_get_binary_addr(nl_addr);
if (memcmp(ifinfo->hwaddr, hwaddr, hwaddr_len)) {
memcpy(ifinfo->hwaddr, hwaddr, hwaddr_len);
- if (!ifinfo->master_ifindex)
- memcpy(ifinfo->orig_hwaddr, hwaddr, hwaddr_len);
+ memcpy(ifinfo->orig_hwaddr, hwaddr, hwaddr_len);
set_changed(ifinfo, CHANGED_HWADDR);
}
}
diff --git a/teamd/teamd.c b/teamd/teamd.c
index c987333..53aec1d 100644
--- a/teamd/teamd.c
Expand Down

0 comments on commit cc6e6b5

Please sign in to comment.