[quagga-dev 5144] Re: [PATCH] RIPv2 Redistributing Static Routes

Paul Jakma Paul.Jakma at Sun.COM
Fri Nov 30 03:25:12 GMT 2007


On Wed, 28 Nov 2007, Daniel Ng wrote:

>> BTW, if using GNU diff, it's useful to pass the '-p' argument to it
>> so that diff puts the function name in the preamble for each chunk.
>> Helps the reader.
>
> Great, thanks for the tip.

Cheers ;)

> Here's what I think you mean. I will test it:
>
> --- ripd.c 2007-11-22 16:19:10.000000000 +1100
> +++ ripd.c 2007-11-28 10:16:38.000000000 +1100
> @@ -2269,12 +2269,27 @@ rip_output_process (struct connected *if
>              * (in order to handle the case when multiple subnets are
>              * configured on the same interface).
>              */
> -     if (rinfo->type == ZEBRA_ROUTE_RIP  &&
> -                 rinfo->ifindex == ifc->ifp->ifindex)
> -       continue;
> -     if (rinfo->type == ZEBRA_ROUTE_CONNECT &&
> -                 prefix_match((struct prefix *)p, ifc->address))
> -       continue;
> +            switch(rinfo->type)
> +            {
> +              case ZEBRA_ROUTE_RIP:
> +              case ZEBRA_ROUTE_STATIC:
> +              {
> +                if (rinfo->ifindex == ifc->ifp->ifindex)
> +                  continue;
> +                break;
> +              }

Wasn't it the idea that this would be the default case?

> +              case ZEBRA_ROUTE_CONNECT:
> +              {
> +                if (prefix_match((struct prefix *)p, ifc->address))
> +                  continue;
> +                break;
> +              }
> +
> +              default:
> +                break;
> +            }

regards,
-- 
Paul Jakma,
Solaris Networking                       Sun Microsystems, Scotland
http://opensolaris.org/os/project/quagga tel: EMEA x73150 / +44 15066 73150



More information about the Quagga-dev mailing list