summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rtsold/probe.c
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2011-06-06 03:06:43 +0000
committerhrs <hrs@FreeBSD.org>2011-06-06 03:06:43 +0000
commit10df0af5a54c03a258caf94e9931b16eec080d79 (patch)
tree7fcbcd5609e82351ec883059d7bfb466d7cb8ef6 /usr.sbin/rtsold/probe.c
parentacbda2ccc11fcdfe5fa5175c97ac29b4bb729bb5 (diff)
downloadFreeBSD-src-10df0af5a54c03a258caf94e9931b16eec080d79.zip
FreeBSD-src-10df0af5a54c03a258caf94e9931b16eec080d79.tar.gz
- Implement RDNSS and DNSSL options (RFC 6106, IPv6 Router Advertisement
Options for DNS Configuration) into rtadvd(8) and rtsold(8). DNS information received by rtsold(8) will go to resolv.conf(5) by resolvconf(8) script. This is based on work by J.R. Oldroyd (kern/156259) but revised extensively[1]. - rtadvd(8) now supports "noifprefix" to disable gathering on-link prefixes from interfaces when no "addr" is specified[2]. An entry in rtadvd.conf with "noifprefix" + no "addr" generates an RA message with no prefix information option. - rtadvd(8) now supports RTM_IFANNOUNCE message to fix crashes when an interface is added or removed. - Correct bogus ND_OPT_ROUTE_INFO value to one in RFC 4191. Reviewed by: bz[1] PR: kern/156259 [1] PR: bin/152458 [2]
Diffstat (limited to 'usr.sbin/rtsold/probe.c')
-rw-r--r--usr.sbin/rtsold/probe.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/rtsold/probe.c b/usr.sbin/rtsold/probe.c
index 6d0ea79..657ae40 100644
--- a/usr.sbin/rtsold/probe.c
+++ b/usr.sbin/rtsold/probe.c
@@ -72,18 +72,18 @@ probe_init(void)
if (sndcmsgbuf == NULL &&
(sndcmsgbuf = (u_char *)malloc(scmsglen)) == NULL) {
warnmsg(LOG_ERR, __func__, "malloc failed");
- return(-1);
+ return (-1);
}
if ((probesock = socket(AF_INET6, SOCK_RAW, IPPROTO_NONE)) < 0) {
warnmsg(LOG_ERR, __func__, "socket: %s", strerror(errno));
- return(-1);
+ return (-1);
}
/* make the socket send-only */
if (shutdown(probesock, 0)) {
warnmsg(LOG_ERR, __func__, "shutdown: %s", strerror(errno));
- return(-1);
+ return (-1);
}
/* initialize msghdr for sending packets */
@@ -92,7 +92,8 @@ probe_init(void)
sndmhdr.msg_iovlen = 1;
sndmhdr.msg_control = (caddr_t)sndcmsgbuf;
sndmhdr.msg_controllen = scmsglen;
- return(0);
+
+ return (0);
}
/*
OpenPOWER on IntegriCloud