tech-net archive

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

Re: [PATCH] Setting IPv6 route advertisement accepting interfaces



On Sun, Jul 12, 2009 at 10:49:52PM +0200, Tonnerre LOMBARD wrote:
> Salut,
> 
> This is the first part of my series of patches concerning IPv6 route
> advertisements. It simply moves the variable deciding whether or not
> to accept IPv6 route advertisements on a specific interface to be
> specific to that interface.
> 
> A second patch is going to separate the setting of when to accept
> a default route (which is why there are more bits left on the
> autoconf integer. However, it would have been really cool had there
> still been 2 bits of space left on if_flags.)
> 
> Either way, here's it. If your mailer doesn't like PGP signed
> attachments, go to
> http://www.netbsd.org/~tonnerre/patches/src/2009/netinet6-rtadv-per-interface.patch
> to find a copy of said patch.
> 
> Any opinions?
> 
>                               Tonnerre

> ? tooldir.NetBSD-4.0-sparc64
> ? tooldir.NetBSD-4.0_wrstuden_fixsa_t1-sparc64
> ? sys/arch/amd64/conf/JULES
> Index: etc/rc.d/network
> ===================================================================
> RCS file: /cvsroot/src/etc/rc.d/network,v
> retrieving revision 1.57.2.1
> diff -u -r1.57.2.1 network
> --- etc/rc.d/network  18 May 2009 19:30:48 -0000      1.57.2.1
> +++ etc/rc.d/network  12 Jul 2009 19:57:48 -0000
> @@ -127,7 +127,7 @@
>               /sbin/route -q add -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject
>  
>               /sbin/sysctl -qw net.inet6.ip6.forwarding=0
> -             /sbin/sysctl -qw net.inet6.ip6.accept_rtadv=0
> +             /sbin/sysctl -qw net.inet6.ip6.accept_rtadv.default=0

There are scripts that rely on that sysctl being at its current path.
Please don't break backwards compatibility in this way.

> Index: sys/net/if.h
> ===================================================================
> RCS file: /cvsroot/src/sys/net/if.h,v
> retrieving revision 1.140
> diff -u -r1.140 if.h
> --- sys/net/if.h      24 Oct 2008 17:07:33 -0000      1.140
> +++ sys/net/if.h      12 Jul 2009 19:59:05 -0000
> @@ -275,6 +275,7 @@
>       struct pfil_head if_pfil;       /* filtering point */
>       uint64_t if_capabilities;       /* interface capabilities */
>       uint64_t if_capenable;          /* capabilities enabled */
> +     int     if_autoconf;            /* IPv6 autoconfiguration */
>       union {
>               void *          carp_s; /* carp structure (used by !carp ifs) */
>               struct ifnet    *carp_d;/* ptr to carpdev (used by carp ifs) */
> @@ -290,6 +291,7 @@
>  
>       void    *if_afdata[AF_MAX];
>       struct  mowner *if_mowner;      /* who owns mbufs for this interface */
> +     struct sysctllog *if_clog;
>  
>       void    *if_agrprivate;         /* used only when #if NAGR > 0 */
>  

Attach information to the ifnet that is private to a protocol domain
using the dom_ifattach/dom_ifdetach hooks in struct domain.

Dave

-- 
David Young             OJC Technologies
dyoung%ojctech.com@localhost      Urbana, IL * (217) 278-3933


Home | Main Index | Thread Index | Old Index