Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153130278
D3301.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D3301.diff
View Options
Index: head/sys/net/if_lagg.c
===================================================================
--- head/sys/net/if_lagg.c
+++ head/sys/net/if_lagg.c
@@ -640,7 +640,7 @@
/* Check to make sure its not already queued to be changed */
SLIST_FOREACH(llq, &sc->sc_llq_head, llq_entries) {
- if (llq->llq_ifp == ifp) {
+ if (llq->llq_ifp == ifp && llq->llq_primary == primary) {
pending = 1;
break;
}
@@ -855,7 +855,7 @@
lagg_port_destroy(struct lagg_port *lp, int rundelport)
{
struct lagg_softc *sc = lp->lp_softc;
- struct lagg_port *lp_ptr;
+ struct lagg_port *lp_ptr, *lp0;
struct lagg_llq *llq;
struct ifnet *ifp = lp->lp_ifp;
uint64_t *pval, vdiff;
@@ -897,18 +897,26 @@
if (lp == sc->sc_primary) {
uint8_t lladdr[ETHER_ADDR_LEN];
- if ((lp_ptr = SLIST_FIRST(&sc->sc_ports)) == NULL) {
+ if ((lp0 = SLIST_FIRST(&sc->sc_ports)) == NULL) {
bzero(&lladdr, ETHER_ADDR_LEN);
} else {
- bcopy(lp_ptr->lp_lladdr,
+ bcopy(lp0->lp_lladdr,
lladdr, ETHER_ADDR_LEN);
}
lagg_lladdr(sc, lladdr);
- sc->sc_primary = lp_ptr;
- /* Update link layer address for each port */
+ /*
+ * Update link layer address for each port. No port is
+ * marked as primary at this moment.
+ */
SLIST_FOREACH(lp_ptr, &sc->sc_ports, lp_entries)
lagg_port_lladdr(lp_ptr, lladdr);
+ /*
+ * Mark lp0 as the new primary. This invokes an
+ * iflladdr_event.
+ */
+ sc->sc_primary = lp0;
+ lagg_port_lladdr(lp0, lladdr);
}
/* Remove any pending lladdr changes from the queue */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 20, 9:15 AM (9 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31829831
Default Alt Text
D3301.diff (1 KB)
Attached To
Mode
D3301: mac address does not update when removing the primary iface from a lagg
Attached
Detach File
Event Timeline
Log In to Comment