[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openbsd-tech
Subject:    Re: rtadvd(8) patch 1/2 : `noifprefix` support
From:       "Stephane A. Sezer" <sas () cd80 ! net>
Date:       2012-02-24 5:04:32
Message-ID: 20120223210432.46e5b404 () prince ! virtualcake ! net
[Download RAW message or body]

On Fri, 27 Jan 2012 15:13:59 +0100
"Stephane A. Sezer" <sas@cd80.net> wrote:

> Hello tech@,
> 
> I discussed a little with brad@ of some features of the rtadvd(8)
> daemon in OpenBSD and of the state of the support for some IPv6
> features and he asked me if it was possible to add a `noifprefix`
> option to the deamon, to disable automatic prefix information querying
> on the interface in case no `addr` option is present in the config file.
> 
> Here is the (very simple) patch for this.
> 
> Regards,

Updated the diff. Now it applies correctly on -current and tabs are kept
(they replaced by spaces in my previous mail).

Hope this works this time.

-- 
Stephane A. Sezer


Index: usr.sbin/rtadvd/config.c
===================================================================
RCS file: usr.sbin/rtadvd/config.c,v
retrieving revision 1.26
diff -u -r1.26 config.c
--- usr.sbin/rtadvd/config.c	23 Apr 2008 10:17:50 -0000	1.26
+++ usr.sbin/rtadvd/config.c	25 Jan 2012 03:30:54 -0000
@@ -320,7 +320,7 @@
 				now.tv_sec + pfx->preflifetime;
 		}
 	}
-	if (tmp->pfxs == 0)
+	if (tmp->pfxs == 0 && !agetflag("noifprefix"))
 		get_prefix(tmp);
 
 	MAYHAVE(val, "mtu", 0);
Index: usr.sbin/rtadvd/rtadvd.conf.5
===================================================================
RCS file: usr.sbin/rtadvd/rtadvd.conf.5,v
retrieving revision 1.25
diff -u -r1.25 rtadvd.conf.5
--- usr.sbin/rtadvd/rtadvd.conf.5	19 Sep 2010 21:59:23 -0000	1.25
+++ usr.sbin/rtadvd/rtadvd.conf.5	25 Jan 2012 03:30:54 -0000
@@ -142,7 +142,9 @@
 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
 can be augmented with a number, like
@@ -184,6 +186,18 @@
 .Xr termcap 5
 file format as well as IPv6 numeric addresses, the field MUST be quoted
 using double quotes.
+.It Cm \&noifprefix
+(bool) Specifies 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 \&vltime
 (num) Valid lifetime field
 .Pq unit: seconds .

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic