Page MenuHomeFreeBSD

D54636.id169451.diff
No OneTemporary

D54636.id169451.diff

diff --git a/usr.sbin/rtadvctl/rtadvctl.c b/usr.sbin/rtadvctl/rtadvctl.c
--- a/usr.sbin/rtadvctl/rtadvctl.c
+++ b/usr.sbin/rtadvctl/rtadvctl.c
@@ -89,6 +89,7 @@
static int action_show_rtinfo(struct rtinfo *);
static int action_show_rdnss(void *);
static int action_show_dnssl(void *);
+static int action_show_pref64(struct pref64 *);
static int csock_client_open(struct sockinfo *);
static size_t dname_labeldec(char *, size_t, const char *);
@@ -624,6 +625,12 @@
printf("\tClock skew: %" PRIu16 "sec\n",
rai->rai_clockskew);
+ /* PREF64 information */
+ if (rai->rai_pref64.p64_enabled) {
+ printf("\tPREF64:\n");
+ action_show_pref64(&rai->rai_pref64);
+ }
+
if (vflag < LOG_WARNING)
continue;
@@ -896,6 +903,25 @@
return (0);
}
+static int
+action_show_pref64(struct pref64 *prf64)
+{
+ char ntopbuf[INET6_ADDRSTRLEN];
+ char ssbuf[SSBUFLEN];
+ uint16_t prf64len;
+
+ if (!prf64->p64_enabled)
+ return (0);
+
+ prf64len = (prf64->p64_plc == 0) ? 96 : 72 - (8 * prf64->p64_plc);
+ printf("\t %s/%d (ltime: %s)\n",
+ inet_ntop(AF_INET6, &prf64->p64_prefix,
+ ntopbuf, sizeof(ntopbuf)),
+ prf64len, sec2str(prf64->p64_sl, ssbuf));
+
+ return (0);
+}
+
/* Decode domain name label encoding in RFC 1035 Section 3.1 */
static size_t
dname_labeldec(char *dst, size_t dlen, const char *src)

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 26, 2:07 AM (9 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27613888
Default Alt Text
D54636.id169451.diff (1 KB)

Event Timeline