[radvd-devel-l] Why not start if routing is disabled?

Pekka Savola pekkas at netcore.fi
Fri May 7 01:18:51 EDT 2010


On Thu, 6 May 2010, Ben Greear wrote:
> On 05/06/2010 04:04 PM, Ben Greear wrote:
>>  Radvd seems to check for net.ipv6.conf.all.forwarding being enabled,
>>  but I'd like to disable this sysctl and just enable individual
>>  interfaces for IPv6 routing.
>>
>>  I can hack the radvd code, but perhaps upstream code could also
>>  be fixed so that it warns at worst if IPv6 routing is disabled?
>
> Something like this, perhaps?

I could apply this for the sake of clarity, but at least before, 
the following two configurations were NOT equivalent with respect to 
eth0 and eth1.  all.forwarding enables forwarding and was required if 
you acted as a router on _any_ interface.  interface-specific settings 
controlled the behaviour from neighbor discovery perspective (whether 
ND set IsRouter flag, joined all-routers multicast address on the 
interface etc.).  This may have changed since but I doubt it.  It is
documented in sysctl docs.

net.ipv6.conf.all.forwarding=0
net.ipv6.conf.eth0.forwarding=1
net.ipv6.conf.eth1.forwarding=1

net.ipv6.conf.all.forwarding=1
net.ipv6.conf.eth0.forwarding=1
net.ipv6.conf.eth1.forwarding=1

With this clarification, do you feel your suggested patch should be 
merged?

>
> diff --git a/3plibs/radvd-1.6/radvd.c b/3plibs/radvd-1.6/radvd.c
> index 310b16c..bf50d31 100644
> --- a/3plibs/radvd-1.6/radvd.c
> +++ b/3plibs/radvd-1.6/radvd.c
> @@ -207,12 +207,7 @@ main(int argc, char *argv[])
>
>         /* if we know how to do it, check whether forwarding is enabled */
>         if (check_ip6_forwarding()) {
> -               if (get_debuglevel() == 0) {
> -                       flog(LOG_ERR, "IPv6 forwarding seems to be disabled, 
> exiting");
> -                       exit(1);
> -               }
> -               else
> -                       flog(LOG_WARNING, "IPv6 forwarding seems to be 
> disabled, but continuing anyway.");
> +               flog(LOG_WARNING, "Global IPv6 forwarding seems to be 
> disabled, continuing anyway.");
>         }
>
>        /* parse config file */
>
>
>

-- 
Pekka Savola                 "You each name yourselves king, yet the
Netcore Oy                    kingdom bleeds."
Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings



More information about the radvd-devel-l mailing list