Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115415991
D33858.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
D33858.diff
View Options
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -411,7 +411,6 @@
struct ip6_moptions im6o;
int icmp6len;
int maxlen;
- caddr_t mac;
NET_EPOCH_ASSERT();
@@ -534,19 +533,30 @@
* Multicast NS MUST add one add the option
* Unicast NS SHOULD add one add the option
*/
- if (nonce == NULL && (mac = nd6_ifptomac(ifp))) {
- int optlen = sizeof(struct nd_opt_hdr) + ifp->if_addrlen;
- struct nd_opt_hdr *nd_opt = (struct nd_opt_hdr *)(nd_ns + 1);
- /* 8 byte alignments... */
- optlen = (optlen + 7) & ~7;
-
- m->m_pkthdr.len += optlen;
- m->m_len += optlen;
- icmp6len += optlen;
- bzero((caddr_t)nd_opt, optlen);
- nd_opt->nd_opt_type = ND_OPT_SOURCE_LINKADDR;
- nd_opt->nd_opt_len = optlen >> 3;
- bcopy(mac, (caddr_t)(nd_opt + 1), ifp->if_addrlen);
+ if (nonce == NULL) {
+ struct nd_opt_hdr *nd_opt;
+ char *mac;
+ int optlen;
+
+ mac = NULL;
+ if (ifp->if_carp)
+ mac = (*carp_macmatch6_p)(ifp, m, &ip6->ip6_src);
+ if (mac == NULL)
+ mac = nd6_ifptomac(ifp);
+
+ if (mac != NULL) {
+ nd_opt = (struct nd_opt_hdr *)(nd_ns + 1);
+ optlen = sizeof(struct nd_opt_hdr) + ifp->if_addrlen;
+ /* 8 byte alignments... */
+ optlen = (optlen + 7) & ~7;
+ m->m_pkthdr.len += optlen;
+ m->m_len += optlen;
+ icmp6len += optlen;
+ bzero(nd_opt, optlen);
+ nd_opt->nd_opt_type = ND_OPT_SOURCE_LINKADDR;
+ nd_opt->nd_opt_len = optlen >> 3;
+ bcopy(mac, nd_opt + 1, ifp->if_addrlen);
+ }
}
/*
* Add a Nonce option (RFC 3971) to detect looped back NS messages.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 24, 2:10 PM (12 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17760341
Default Alt Text
D33858.diff (1 KB)
Attached To
Mode
D33858: nd6: properly fill CARP link level address for NS sent out
Attached
Detach File
Event Timeline
Log In to Comment