Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/rtadvd Add support for the noifprefix keyword which...



details:   https://anonhg.NetBSD.org/src/rev/321ac1c61aa8
branches:  trunk
changeset: 783215:321ac1c61aa8
user:      roy <roy%NetBSD.org@localhost>
date:      Tue Dec 11 16:37:23 2012 +0000

description:
Add support for the noifprefix keyword which stops rtadvd(8) gathing prefix
information from the interface if no addrs are present in rtadvd.conf(5).

diffstat:

 usr.sbin/rtadvd/config.c      |   4 ++--
 usr.sbin/rtadvd/rtadvd.conf.5 |  23 ++++++++++++++++++++---
 2 files changed, 22 insertions(+), 5 deletions(-)

diffs (68 lines):

diff -r af648e4055b6 -r 321ac1c61aa8 usr.sbin/rtadvd/config.c
--- a/usr.sbin/rtadvd/config.c  Tue Dec 11 15:39:06 2012 +0000
+++ b/usr.sbin/rtadvd/config.c  Tue Dec 11 16:37:23 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: config.c,v 1.28 2012/08/08 04:05:26 msaitoh Exp $      */
+/*     $NetBSD: config.c,v 1.29 2012/12/11 16:37:23 roy Exp $  */
 /*     $KAME: config.c,v 1.93 2005/10/17 14:40:02 suz Exp $    */
 
 /*
@@ -396,7 +396,7 @@
                                now.tv_sec + pfx->preflifetime;
                }
        }
-       if (TAILQ_FIRST(&tmp->prefix) == NULL)
+       if (TAILQ_FIRST(&tmp->prefix) == NULL && !agetflag("noifprefix"))
                get_prefix(tmp);
 
        MAYHAVE(val64, "mtu", 0);
diff -r af648e4055b6 -r 321ac1c61aa8 usr.sbin/rtadvd/rtadvd.conf.5
--- a/usr.sbin/rtadvd/rtadvd.conf.5     Tue Dec 11 15:39:06 2012 +0000
+++ b/usr.sbin/rtadvd/rtadvd.conf.5     Tue Dec 11 16:37:23 2012 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: rtadvd.conf.5,v 1.17 2012/04/21 12:27:30 roy Exp $
+.\"    $NetBSD: rtadvd.conf.5,v 1.18 2012/12/11 16:37:23 roy Exp $
 .\"    $KAME: rtadvd.conf.5,v 1.50 2005/01/14 05:30:59 jinmei Exp $
 .\"
 .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -28,7 +28,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd April 5, 2012
+.Dd December 11, 2012
 .Dt RTADVD.CONF 5
 .Os
 .Sh NAME
@@ -175,13 +175,30 @@
 These items can be omitted, then
 .Nm rtadvd
 will automatically get appropriate prefixes from the kernel's routing table,
-and advertise the prefixes with the default parameters.
+and advertise the prefixes with the default parameters, unless the
+.Cm noifprefix
+flag is specified.
 Keywords other than
 .Cm clockskew
+and
+.Cm noifprefix
 can be augmented with a number, like
 .Dq Li prefix2 ,
 to specify multiple prefixes.
 .Bl -tag -width indent
+.It Cm \&noifprefix
+(bool) Specified whether
+.Nm rtadvd
+should gather prefix information from the interface if no
+.Cm addr
+is specified.
+If no
+.Cm addr
+is given, and
+.Cm noifprefix
+is set,
+.Nm rtadvd
+will send RA packets with no prefix information.
 .It Cm \&clockskew
 (num) Time skew to adjust link propagation delays and clock skews
 between routers on the link



Home | Main Index | Thread Index | Old Index