Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143098175
D27631.id80838.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
D27631.id80838.diff
View Options
Index: sys/net/if_infiniband.c
===================================================================
--- sys/net/if_infiniband.c
+++ sys/net/if_infiniband.c
@@ -187,6 +187,8 @@
case AF_INET:
if (lle != NULL && (lle->la_flags & LLE_VALID)) {
memcpy(edst, lle->ll_addr, sizeof(edst));
+ } else if (m->m_flags & M_BCAST) {
+ memcpy(edst, ifp->if_broadcastaddr, INFINIBAND_ADDR_LEN);
} else if (m->m_flags & M_MCAST) {
infiniband_ipv4_multicast_map(
((const struct sockaddr_in *)dst)->sin_addr.s_addr,
@@ -243,21 +245,15 @@
}
#endif
#ifdef INET6
- case AF_INET6: {
- const struct ip6_hdr *ip6;
-
- ip6 = mtod(m, const struct ip6_hdr *);
- if (m->m_len < sizeof(*ip6)) {
- error = EINVAL;
- goto bad;
- } else if (lle != NULL && (lle->la_flags & LLE_VALID)) {
+ case AF_INET6:
+ if (lle != NULL && (lle->la_flags & LLE_VALID)) {
memcpy(edst, lle->ll_addr, sizeof(edst));
+ } else if (m->m_flags & M_BCAST) {
+ memcpy(edst, ifp->if_broadcastaddr, INFINIBAND_ADDR_LEN);
} else if (m->m_flags & M_MCAST) {
infiniband_ipv6_multicast_map(
&((const struct sockaddr_in6 *)dst)->sin6_addr,
ifp->if_broadcastaddr, edst);
- } else if (ip6->ip6_nxt == IPPROTO_ICMPV6) {
- memcpy(edst, ifp->if_broadcastaddr, INFINIBAND_ADDR_LEN);
} else {
error = nd6_resolve(ifp, is_gw, m, dst, edst, NULL, NULL);
if (error) {
@@ -269,7 +265,6 @@
}
type = htons(ETHERTYPE_IPV6);
break;
- }
#endif
default:
error = EAFNOSUPPORT;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 26, 11:30 PM (5 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28018558
Default Alt Text
D27631.id80838.diff (1 KB)
Attached To
Mode
D27631: Streamline infiniband code according to ethernet code
Attached
Detach File
Event Timeline
Log In to Comment