>Number:         165384
>Category:       bin
>Synopsis:       [PATCH] Add option to suppress RA prefix info
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 22 04:20:11 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Craig Leres
>Release:        FreeBSD 8.2-RELEASE amd64
>Organization:
Lawrence Berkeley National Laboratory
>Environment:
    FreeBSD hot.ee.lbl.gov 8.2-RELEASE FreeBSD 8.2-RELEASE #11 r43: Tue Oct 4 
13:18:06 PDT 2011 
le...@hot.ee.lbl.gov:/usr/src/8.2-RELEASE/sys/amd64/compile/LBLIPV6 amd64

>Description:
        To create a stateful IPv6 DHCP environment, routing
        advertisement messages must set the "managed" flag, may
        optionally set the "other stateful" flag and must not include
        any prefix information; including prefix information in
        router advertisemessages explicitly allows clients to use
        stateless address autoconfiguration.

        rtadvd does not provide a configuration option to suppress
        prefix info. If you do not explicitly specify one or more
        "addr" options, rtadvd automatically discovers prefixes by
        iterating over the interfaces.

>How-To-Repeat:
>Fix:
        The attached patches add a "noprefix" option to rtadvd.conf.

--- patch-config.c begins here ---
Index: config.c
===================================================================
--- config.c    (revision 43)
+++ config.c    (working copy)
@@ -283,6 +283,13 @@
                if (addr == NULL)
                        continue;
 
+               if (agetflag("noprefix")) {
+                       syslog(LOG_ERR,
+                           "noprefix is set but addr is set (%s); ignoring",
+                           addr);
+                       continue;
+               }
+
                /* allocate memory to store prefix information */
                if ((pfx = malloc(sizeof(struct prefix))) == NULL) {
                        syslog(LOG_ERR,
@@ -381,7 +388,7 @@
                                now.tv_sec + pfx->preflifetime;
                }
        }
-       if (tmp->pfxs == 0)
+       if (tmp->pfxs == 0 && !agetflag("noprefix"))
                get_prefix(tmp);
 
        MAYHAVE(val, "mtu", 0);
--- patch-config.c ends here ---

--- patch-rtadvd.conf.5 begins here ---
Index: rtadvd.conf.5
===================================================================
--- rtadvd.conf.5       (revision 43)
+++ rtadvd.conf.5       (working copy)
@@ -172,7 +172,10 @@
 .El
 .Pp
 The following items are for ICMPv6 prefix information option,
-which will be attached to router advertisement header.
+which will be attached to router advertisement header
+unless the 
+.Cm noprefix
+option is specified.
 These items can be omitted, then
 .Nm rtadvd
 will automatically get appropriate prefixes from the kernel's routing table,
@@ -183,6 +186,8 @@
 .Dq Li prefix2 ,
 to specify multiple prefixes.
 .Bl -tag -width indent
+.It Cm \&noprefix
+(bool) Suppress prefix headers.
 .It Cm \&clockskew
 (num) Time skew to adjust link propagation delays and clock skews
 between routers on the link
--- patch-rtadvd.conf.5 ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to