Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F111905232
D27658.id81308.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
D27658.id81308.diff
View Options
diff --git a/sys/net/if_lagg.h b/sys/net/if_lagg.h
--- a/sys/net/if_lagg.h
+++ b/sys/net/if_lagg.h
@@ -258,13 +258,14 @@
int flowid_shift; /* shift the flowid */
struct lagg_counters detached_counters; /* detached ports sum */
struct callout sc_watchdog; /* watchdog timer */
+#define LAGG_ADDR_LEN \
+ MAX(INFINIBAND_ADDR_LEN, ETHER_ADDR_LEN)
+ uint8_t sc_bcast_addr[LAGG_ADDR_LEN];
};
struct lagg_port {
struct ifnet *lp_ifp; /* physical interface */
struct lagg_softc *lp_softc; /* parent lagg */
-#define LAGG_ADDR_LEN \
- MAX(INFINIBAND_ADDR_LEN, ETHER_ADDR_LEN)
uint8_t lp_lladdr[LAGG_ADDR_LEN];
u_char lp_iftype; /* interface type */
diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c
--- a/sys/net/if_lagg.c
+++ b/sys/net/if_lagg.c
@@ -511,11 +511,6 @@
int if_type;
int error;
static const uint8_t eaddr[LAGG_ADDR_LEN];
- static const uint8_t ib_bcast_addr[INFINIBAND_ADDR_LEN] = {
- 0x00, 0xff, 0xff, 0xff,
- 0xff, 0x12, 0x40, 0x1b, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff
- };
if (params != NULL) {
error = copyin(params, &iflp, sizeof(iflp));
@@ -603,7 +598,7 @@
ether_ifattach(ifp, eaddr);
break;
case IFT_INFINIBAND:
- infiniband_ifattach(ifp, eaddr, ib_bcast_addr);
+ infiniband_ifattach(ifp, eaddr, sc->sc_bcast_addr);
break;
default:
break;
@@ -1239,8 +1234,11 @@
lp_ifp = lp->lp_ifp;
if (ifp != NULL && lp_ifp != NULL &&
- memcmp(IF_LLADDR(ifp), IF_LLADDR(lp_ifp), ifp->if_addrlen) != 0) {
+ (memcmp(IF_LLADDR(ifp), IF_LLADDR(lp_ifp), ifp->if_addrlen) != 0 ||
+ memcmp(sc->sc_bcast_addr, lp_ifp->if_broadcastaddr, ifp->if_addrlen) != 0)) {
memcpy(IF_LLADDR(ifp), IF_LLADDR(lp_ifp), ifp->if_addrlen);
+ memcpy(sc->sc_bcast_addr, lp_ifp->if_broadcastaddr, ifp->if_addrlen);
+
CURVNET_SET(ifp->if_vnet);
EVENTHANDLER_INVOKE(iflladdr_event, ifp);
CURVNET_RESTORE();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 11, 1:58 AM (15 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17092827
Default Alt Text
D27658.id81308.diff (1 KB)
Attached To
Mode
D27658: Fix for IPoIB over lagg
Attached
Detach File
Event Timeline
Log In to Comment