Page MenuHomeFreeBSD

D32956.diff
No OneTemporary

D32956.diff

diff --git a/usr.sbin/rtsold/rtsold.8 b/usr.sbin/rtsold/rtsold.8
--- a/usr.sbin/rtsold/rtsold.8
+++ b/usr.sbin/rtsold/rtsold.8
@@ -29,7 +29,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 14, 2021
+.Dd November 12, 2021
.Dt RTSOLD 8
.Os
.\"
@@ -39,27 +39,27 @@
.\"
.Sh SYNOPSIS
.Nm
-.Op Fl dDfFmu1
+.Op Fl dDfFimu1
.Op Fl M Ar script-name
.Op Fl O Ar script-name
.Op Fl p Ar pidfile
.Op Fl R Ar script-name
.Ar interface ...
.Nm
-.Op Fl dDfFmu1
+.Op Fl dDfFimu1
.Op Fl M Ar script-name
.Op Fl O Ar script-name
.Op Fl p Ar pidfile
.Op Fl R Ar script-name
.Fl a
.Nm rtsol
-.Op Fl dDu
+.Op Fl dDiu
.Op Fl M Ar script-name
.Op Fl O Ar script-name
.Op Fl R Ar script-name
.Ar interface ...
.Nm rtsol
-.Op Fl dDu
+.Op Fl dDiu
.Op Fl M Ar script-name
.Op Fl O Ar script-name
.Op Fl R Ar script-name
@@ -194,6 +194,12 @@
.Xr sysctl 8
and
.Xr ifconfig 8 .
+.It Fl i
+Transmit Router Solicitation packets immediately, without waiting the
+normal random (between 0 and 1 second) delay.
+This option should not be used on networks where it might result in
+congestion due to many hosts simultaneously (re)connecting and
+sending such packets.
.It Fl m
Enable mobility support.
If this option is specified,
diff --git a/usr.sbin/rtsold/rtsold.c b/usr.sbin/rtsold/rtsold.c
--- a/usr.sbin/rtsold/rtsold.c
+++ b/usr.sbin/rtsold/rtsold.c
@@ -99,6 +99,7 @@
/* static variables and functions */
static int mobile_node = 0;
+static int no_solicitation_delay = 0;
static sig_atomic_t do_dump, do_exit;
static struct pidfh *pfh;
@@ -125,11 +126,11 @@
progname = basename(argv[0]);
if (strcmp(progname, "rtsold") == 0) {
- opts = "adDfFm1M:O:p:R:u";
+ opts = "adDfFim1M:O:p:R:u";
once = 0;
pidfilepath = NULL;
} else {
- opts = "adDFM:O:R:u";
+ opts = "adDFiM:O:R:u";
fflag = 1;
once = 1;
}
@@ -151,6 +152,9 @@
case 'F':
Fflag = 1;
break;
+ case 'i':
+ no_solicitation_delay = 1;
+ break;
case 'm':
mobile_node = 1;
break;
@@ -717,7 +721,10 @@
ifi->timer = tm_max; /* stop timer(valid?) */
break;
case IFS_DELAY:
- interval = arc4random_uniform(MAX_RTR_SOLICITATION_DELAY * MILLION);
+ if (no_solicitation_delay)
+ interval = 0;
+ else
+ interval = arc4random_uniform(MAX_RTR_SOLICITATION_DELAY * MILLION);
ifi->timer.tv_sec = interval / MILLION;
ifi->timer.tv_nsec = (interval % MILLION) * 1000;
break;

File Metadata

Mime Type
text/plain
Expires
Mon, Sep 30, 1:23 PM (21 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13186570
Default Alt Text
D32956.diff (2 KB)

Event Timeline