Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152550938
D56131.id174455.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D56131.id174455.diff
View Options
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -1324,7 +1324,7 @@
* nd6_prelist_add will install the corresponding
* interface route.
*/
- if ((error = nd6_prelist_add(&pr0, NULL, &pr)) != 0) {
+ if ((error = nd6_prelist_add(&pr0, &pr)) != 0) {
if (carp_attached)
(*carp_detach_p)(&ia->ia_ifa, false);
goto out;
diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c
--- a/sys/netinet6/in6_ifattach.c
+++ b/sys/netinet6/in6_ifattach.c
@@ -625,7 +625,7 @@
* valid with referring to the old link-local address.
*/
if ((pr = nd6_prefix_lookup(&pr0)) == NULL) {
- if ((error = nd6_prelist_add(&pr0, NULL, &pr)) != 0)
+ if ((error = nd6_prelist_add(&pr0, &pr)) != 0)
return (error);
/* Reference prefix */
ia->ia6_ndpr = pr;
diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h
--- a/sys/netinet6/nd6.h
+++ b/sys/netinet6/nd6.h
@@ -395,8 +395,7 @@
void nd6_defrouter_purge(struct ifnet *);
void nd6_defrouter_timer(void);
void nd6_defrouter_init(void);
-int nd6_prelist_add(struct nd_prefixctl *, struct nd_defrouter *,
- struct nd_prefix **);
+int nd6_prelist_add(struct nd_prefixctl *, struct nd_prefix **);
void nd6_prefix_unlink(struct nd_prefix *, struct nd_prhead *);
void nd6_prefix_del(struct nd_prefix *);
void nd6_prefix_ref(struct nd_prefix *);
diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c
--- a/sys/netinet6/nd6_rtr.c
+++ b/sys/netinet6/nd6_rtr.c
@@ -1381,8 +1381,7 @@
}
int
-nd6_prelist_add(struct nd_prefixctl *pr, struct nd_defrouter *dr,
- struct nd_prefix **newp)
+nd6_prelist_add(struct nd_prefixctl *pr, struct nd_prefix **newp)
{
struct nd_prefix *new;
char ip6buf[INET6_ADDRSTRLEN];
@@ -1429,8 +1428,6 @@
ND6_ONLINK_UNLOCK();
}
- if (dr != NULL)
- pfxrtr_add(new, dr);
if (newp != NULL)
*newp = new;
return (0);
@@ -1552,17 +1549,15 @@
NET_EPOCH_ASSERT();
/* check if prefix already exists on the same interface */
- if ((pr = nd6_prefix_lookup(new)) != NULL) {
+ if ((pr = nd6_prefix_lookup(new)) != NULL)
nd6_prefix_update(new, pr);
- if (dr != NULL)
- pfxrtr_add(pr, dr);
- } else {
+ else {
if (new->ndpr_vltime == 0)
goto end;
if (new->ndpr_raf_onlink == 0 && new->ndpr_raf_auto == 0)
goto end;
- error = nd6_prelist_add(new, dr, &pr);
+ error = nd6_prelist_add(new, &pr);
if (error != 0) {
nd6log((LOG_NOTICE, "%s: nd6_prelist_add() failed for "
"the prefix %s/%d on %s (errno=%d)\n", __func__,
@@ -1584,6 +1579,8 @@
in6_init_prefix_ltimes(pr);
}
}
+ if (dr != NULL)
+ pfxrtr_add(pr, dr);
/*
* Address autoconfiguration based on Section 5.5.3 of RFC 2462.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 16, 3:24 PM (17 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31611673
Default Alt Text
D56131.id174455.diff (2 KB)
Attached To
Mode
D56131: nd6: break pfxrtr_add out of nd6_prelist_add
Attached
Detach File
Event Timeline
Log In to Comment