On Sun, Sep 13, 2015 at 11:15:50AM +0200, Martin Pieuchot wrote:
> This makes the kernel simpler as it no longer try to find a new ifa
> when a route with a stale address is being used.

This makes the code simpler, which is good.

I am still not convinced that we want to loose the feature that the
routes jump to another interface address.  When we have multiple
suiteable addresses and one gets deleted, the system can use another
one.

> Tests and oks welcome.

The patch itself looks correct.  Just one question:

> @@ -850,22 +850,10 @@ rtrequest1(int req, struct rt_addrinfo *
>                       return (EINVAL);
>               if ((rt->rt_flags & RTF_CLONING) == 0)
>                       return (EINVAL);
> -             if (rt->rt_ifa->ifa_ifp) {
> -                     info->rti_ifa = rt->rt_ifa;
> -             } else {
> -                     /*
> -                      * The address of the cloning route is not longer
> -                      * configured on an interface, but its descriptor
> -                      * is still there because of reference counting.
> -                      *
> -                      * Try to find a similar active address and use
> -                      * it for the cloned route.  The cloning route
> -                      * will get the new address and interface later.
> -                      */
> -                     info->rti_ifa = NULL;
> -                     info->rti_info[RTAX_IFA] = rt->rt_ifa->ifa_addr;
> -             }
> +             if (rt->rt_ifa->ifa_ifp == NULL)
> +                     return (EAGAIN);

Why return EAGAIN here?  Should it be EINVAL like in the other
cases?  Can this happen at all?

bluhm

Reply via email to