FreeBSD Bugzilla – Attachment 242978 Details for
Bug 265761
rtadvd(8) should also deprecate prefix on shutdown
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
deprecate prefixes on shutdown by default
deprecate.diff (text/plain), 2.45 KB, created by
Daniel Ponte
on 2023-06-24 22:59:41 UTC
(
hide
)
Description:
deprecate prefixes on shutdown by default
Filename:
MIME Type:
Creator:
Daniel Ponte
Created:
2023-06-24 22:59:41 UTC
Size:
2.45 KB
patch
obsolete
>commit f3bd2023c3c13a5cf9400cce397607afdb9c62d5 >Author: Dan Ponte <amigan@gmail.com> >Date: Thu May 25 15:20:14 2023 -0400 > > rtadvd: add deprecation of addresses on shutdown > >diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c >index f857889332a4..66c54821ae1d 100644 >--- a/usr.sbin/rtadvd/config.c >+++ b/usr.sbin/rtadvd/config.c >@@ -379,6 +379,12 @@ getconfig(struct ifinfo *ifi) > else > rai->rai_advifprefix = 1; > >+ /* deprecate on shutdown? */ >+ if (agetflag("nodeprecate")) >+ rai->rai_deprecate = 0; >+ else >+ rai->rai_deprecate = 1; >+ > /* get interface information */ > if (agetflag("nolladdr")) > rai->rai_advlinkopt = 0; >diff --git a/usr.sbin/rtadvd/rtadvd.c b/usr.sbin/rtadvd/rtadvd.c >index 391c95c9bd48..acf03b6c00d8 100644 >--- a/usr.sbin/rtadvd/rtadvd.c >+++ b/usr.sbin/rtadvd/rtadvd.c >@@ -369,6 +369,7 @@ rtadvd_shutdown(void) > { > struct ifinfo *ifi; > struct rainfo *rai; >+ struct prefix *prefix; > struct rdnss *rdn; > struct dnssl *dns; > >@@ -411,6 +412,12 @@ rtadvd_shutdown(void) > > TAILQ_FOREACH(rai, &railist, rai_next) { > rai->rai_lifetime = 0; >+ if (rai->rai_deprecate) { >+ TAILQ_FOREACH(prefix, &rai->rai_prefix, pfx_next) { >+ prefix->pfx_validlifetime = 0; >+ prefix->pfx_preflifetime = 0; >+ } >+ } > TAILQ_FOREACH(rdn, &rai->rai_rdnss, rd_next) > rdn->rd_ltime = 0; > TAILQ_FOREACH(dns, &rai->rai_dnssl, dn_next) >diff --git a/usr.sbin/rtadvd/rtadvd.conf.5 b/usr.sbin/rtadvd/rtadvd.conf.5 >index d4a0c0258915..ade8f13829bd 100644 >--- a/usr.sbin/rtadvd/rtadvd.conf.5 >+++ b/usr.sbin/rtadvd/rtadvd.conf.5 >@@ -430,6 +430,19 @@ DNS search list entries. > The default value is 3/2 of the interval time. > .El > .Pp >+The following item controls prefix deprecation on >+.Nm rtadvd >+shutdown. >+.Bl -tag -width indent >+.It Cm \&nodeprecate >+(bool) By default >+.Pc , >+.Xr rtadvd 8 >+will deprecate prefixes on shutdown. If this capability exists, >+.Xr rtadvd 8 >+will not deprecate addresses on shutdown. >+.El >+.Pp > You can also refer one line from another by using > .Cm tc > capability. >diff --git a/usr.sbin/rtadvd/rtadvd.h b/usr.sbin/rtadvd/rtadvd.h >index 885d2fbb3c80..68d9748d0ee1 100644 >--- a/usr.sbin/rtadvd/rtadvd.h >+++ b/usr.sbin/rtadvd/rtadvd.h >@@ -189,6 +189,7 @@ struct rainfo { > > int rai_advlinkopt; /* bool: whether include link-layer addr opt */ > int rai_advifprefix; /* bool: gather IF prefixes? */ >+ int rai_deprecate; /* bool: deprecate on shutdown */ > > /* Router configuration variables */ > uint16_t rai_lifetime; /* AdvDefaultLifetime */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 265761
:
235827
| 242978