On Wed, Nov 26, 2014 at 12:58:35PM +0100, Martin Pieuchot wrote:
> @@ -761,7 +754,17 @@ report:
>                               error = EDQUOT;
>                               goto flush;
>                       }
> -                     ifa = info.rti_ifa;
> +                     /*
> +                      * new gateway could require new ifaddr, ifp;
> +                      * flags may also be different; ifp may be specified
> +                      * by ll sockaddr when protocol address is ambiguous
> +                      */
> +                     if (newgate || info.rti_info[RTAX_IFP] != NULL ||
> +                         info.rti_info[RTAX_IFA] != NULL) {

rt_getifa() may also use RTAX_DST to set rti_ifa.  So I think there
should be a "|| info.rti_info[RTAX_DST] != NULL" in the condition.

> +                             if ((error = rt_getifa(&info, tableid)) != 0)
> +                                     goto flush;
> +                             ifa = info.rti_ifa;
> +                     }
>                       if (ifa) {
>                               if (rt->rt_ifa != ifa) {
>                                       if (rt->rt_ifa->ifa_rtrequest)

bluhm

Reply via email to