Page MenuHomeFreeBSD

D54636.id169519.diff
No OneTemporary

D54636.id169519.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
@@ -43,6 +43,7 @@
#include <netinet6/in6_var.h>
#include <netinet6/nd6.h>
#include <arpa/inet.h>
+#include <assert.h>
#include <fcntl.h>
#include <errno.h>
#include <inttypes.h>
@@ -89,6 +90,7 @@
static int action_show_rtinfo(struct rtinfo *);
static int action_show_rdnss(void *);
static int action_show_dnssl(void *);
+static void action_show_pref64(struct pref64 *);
static int csock_client_open(struct sockinfo *);
static size_t dname_labeldec(char *, size_t, const char *);
@@ -624,6 +626,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 +904,22 @@
return (0);
}
+static void
+action_show_pref64(struct pref64 *prf64)
+{
+ char ntopbuf[INET6_ADDRSTRLEN];
+ char ssbuf[SSBUFLEN];
+ uint16_t prf64len;
+
+ assert(prf64->p64_enabled);
+
+ 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));
+}
+
/* 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
Wed, Apr 22, 6:10 AM (19 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31958019
Default Alt Text
D54636.id169519.diff (1 KB)

Event Timeline