summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rtadvctl
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2011-09-12 23:52:55 +0000
committerhrs <hrs@FreeBSD.org>2011-09-12 23:52:55 +0000
commit2652dfc6f92bbcd0c714b04442954911f1e5377a (patch)
tree5d253725204ad7ad06ada9199c18698349a3f20e /usr.sbin/rtadvctl
parentebd93e5aff0f6d81473632a976e39d5d4cb26f8b (diff)
downloadFreeBSD-src-2652dfc6f92bbcd0c714b04442954911f1e5377a.zip
FreeBSD-src-2652dfc6f92bbcd0c714b04442954911f1e5377a.tar.gz
- Fix a bug that can lead to displaying an incorrect value. (r224210)
- Fix an abnormal termination caused by twice of "rtadvctl disable". (r224303) - Use poll() to wait for the control message socket instead of a spin loop. (r224304) - s/cmsg_/cm_/ to avoid conflict with CMSG_* symbols for struct cmsghdr. (r224619) - Ignore an interface that never sent RAs for graceful shut-down. (r224620) - Refine log messages. (r225148) - Fix SIGSEGV when receiving RAs that contain RDNSS and/or DNSSL options. (r225149) Approved by: re (kib)
Diffstat (limited to 'usr.sbin/rtadvctl')
-rw-r--r--usr.sbin/rtadvctl/rtadvctl.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/usr.sbin/rtadvctl/rtadvctl.c b/usr.sbin/rtadvctl/rtadvctl.c
index 26bf11d..adc87b5 100644
--- a/usr.sbin/rtadvctl/rtadvctl.c
+++ b/usr.sbin/rtadvctl/rtadvctl.c
@@ -260,13 +260,13 @@ action_plgeneric(int action, char *plstr, char *buf)
*q++ = '\0';
cp.cp_val = q;
}
- cm->cm_len += cmsg_pl2bin(msg, &cp);
+ cm->cm_len += cm_pl2bin(msg, &cp);
mysyslog(LOG_DEBUG, "<%s> key=%s, val_len=%d, ifname=%s",
__func__,cp.cp_key, cp.cp_val_len, cp.cp_ifname);
}
- return (cmsg_handler_client(s->si_fd, CM_STATE_MSG_DISPATCH, buf));
+ return (cm_handler_client(s->si_fd, CM_STATE_MSG_DISPATCH, buf));
}
static int
@@ -285,7 +285,7 @@ action_propget(char *argv, struct ctrl_msg_pl *cp)
if (error || cm->cm_len <= sizeof(*cm))
return (1);
- cmsg_bin2pl(msg, cp);
+ cm_bin2pl(msg, cp);
mysyslog(LOG_DEBUG, "<%s> type=%d, len=%d",
__func__, cm->cm_type, cm->cm_len);
mysyslog(LOG_DEBUG, "<%s> key=%s, val_len=%d, ifname=%s",
@@ -571,9 +571,9 @@ action_show(int argc, char **argv)
printf("\n");
- printf("\tMinAdvInterval/MaxAdvInterval: %s/%s\n",
- sec2str(rai->rai_mininterval, ssbuf),
- sec2str(rai->rai_maxinterval, ssbuf));
+ printf("\tMinAdvInterval/MaxAdvInterval: ");
+ printf("%s/", sec2str(rai->rai_mininterval, ssbuf));
+ printf("%s\n", sec2str(rai->rai_maxinterval, ssbuf));
if (rai->rai_linkmtu)
printf("\tAdvLinkMTU: %d", rai->rai_linkmtu);
else
@@ -593,11 +593,10 @@ action_show(int argc, char **argv)
printf("Preference: %s\n",
rtpref_str[(rai->rai_rtpref >> 3) & 0xff]);
- printf("\t"
- "ReachableTime: %s, "
- "RetransTimer: %s, "
+ printf("\tReachableTime: %s, ",
+ sec2str(rai->rai_reachabletime, ssbuf));
+ printf("RetransTimer: %s, "
"CurHopLimit: %d\n",
- sec2str(rai->rai_reachabletime, ssbuf),
sec2str(rai->rai_retranstimer, ssbuf),
rai->rai_hoplimit);
printf("\tAdvIfPrefixes: %s\n",
OpenPOWER on IntegriCloud