summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rtsold/rtsold.c
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2003-08-08 16:42:37 +0000
committerume <ume@FreeBSD.org>2003-08-08 16:42:37 +0000
commit02ba92cc973152efd707c7e8e1c3b17091ddb26e (patch)
tree099a5ddb0139b1572c5cc2a9d1f4dc52af700a65 /usr.sbin/rtsold/rtsold.c
parent52b4a696e076a7e2fb7dd05bd2f6feec997189cd (diff)
downloadFreeBSD-src-02ba92cc973152efd707c7e8e1c3b17091ddb26e.zip
FreeBSD-src-02ba92cc973152efd707c7e8e1c3b17091ddb26e.tar.gz
Process the "O bit."
If the value of OtherConfigFlag changes from FALSE to TRUE, the host should invoke the stateful autoconfiguration protocol, requesting information. [RFC 2462 Section 5.5.3] Obtained from: KAME MFC after: 1 week
Diffstat (limited to 'usr.sbin/rtsold/rtsold.c')
-rw-r--r--usr.sbin/rtsold/rtsold.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/usr.sbin/rtsold/rtsold.c b/usr.sbin/rtsold/rtsold.c
index e3b9a61..55b1942 100644
--- a/usr.sbin/rtsold/rtsold.c
+++ b/usr.sbin/rtsold/rtsold.c
@@ -57,6 +57,7 @@ struct ifinfo *iflist;
struct timeval tm_max = {0x7fffffff, 0x7fffffff};
int aflag = 0;
int dflag = 0;
+char *otherconf_script;
static int log_upto = 999;
static int fflag = 0;
@@ -126,9 +127,9 @@ main(argc, argv)
if (argv0 && argv0[strlen(argv0) - 1] != 'd') {
fflag = 1;
once = 1;
- opts = "adD";
+ opts = "adDO:";
} else
- opts = "adDfm1";
+ opts = "adDfm1O:";
while ((ch = getopt(argc, argv, opts)) != -1) {
switch (ch) {
@@ -150,6 +151,9 @@ main(argc, argv)
case '1':
once = 1;
break;
+ case 'O':
+ otherconf_script = optarg;
+ break;
default:
usage(argv0);
/*NOTREACHED*/
@@ -196,6 +200,11 @@ main(argc, argv)
setlogmask(LOG_UPTO(log_upto));
}
+ if (otherconf_script && *otherconf_script != '/') {
+ errx(1, "configuration script (%s) must be an absolute path",
+ otherconf_script);
+ }
+
#ifndef HAVE_ARC4RANDOM
/* random value initilization */
srandom((u_long)time(NULL));
@@ -524,6 +533,13 @@ rtsol_check_timer()
ifinfo->state = IFS_PROBE;
}
+ /*
+ * If we need a probe, clear the previous
+ * status wrt the "other" configuration.
+ */
+ if (probe)
+ ifinfo->otherconfig = 0;
+
if (probe && mobile_node)
defrouter_probe(ifinfo->sdl->sdl_index);
break;
OpenPOWER on IntegriCloud