[radvd-devel-l] [PATCH] continue even if forwarding is off

Reuben Hawkins reubenhwk at gmail.com
Wed May 4 13:27:56 EDT 2011


On Wed, May 4, 2011 at 7:03 AM, Ludwig Nussel <ludwig.nussel at suse.de> wrote:

> radvd is useful for advertising ULA's without having a router too
> ---
>  radvd.c |   11 ++++-------
>  1 files changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/radvd.c b/radvd.c
> index 5071b4a..3b7a56b 100644
> --- a/radvd.c
> +++ b/radvd.c
> @@ -252,12 +252,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, "IPv6 forwarding seems to be disabled,
> but continuing anyway.");
>        }
>
>        /* parse config file */
> @@ -786,6 +781,7 @@ check_ip6_forwarding(void)
>        int value;
>        size_t size = sizeof(value);
>        FILE *fp = NULL;
> +       static int warned = 0;
>
>  #ifdef __linux__
>        fp = fopen(PROC_SYS_IP6_FORWARDING, "r");
> @@ -810,7 +806,8 @@ check_ip6_forwarding(void)
>                return(0);      /* this is of advisory value only */
>        }
>
> -       if (value != 1) {
> +       if (value != 1 && !warned) {
> +               warned = 1;
>                flog(LOG_DEBUG, "IPv6 forwarding setting is: %u, should be
> 1", value);
>                return(-1);
>        }
> --
> 1.7.3.4
>
>
> --
> radvd-devel-l mailing list  :  radvd-devel-l at litech.org
> http://lists.litech.org/listinfo/radvd-devel-l
>


Agreed...Applied.  Please check CVS to make sure it applied correctly.

Thanks
Reuben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litech.org/pipermail/radvd-devel-l/attachments/20110504/d7d5b06f/attachment.html>


More information about the radvd-devel-l mailing list