On Tue, Mar 29, 2016 at 12:59:46PM +0200, Martin Pieuchot wrote:
> @@ -600,6 +601,10 @@ route_output(struct mbuf *m, ...)
> +             if (route_arp_conflict(&info, tableid)) {
> +                     error = EEXIST;
> +                     goto flush;
> +             }

I don't like a function that returns a boolean when its name does
not clearly say so.  And this function has side effects.
What about returning EEXIST and using this check?

                if ((error = route_arp_conflict(&info, tableid)))
                        goto flush;

> +route_arp_conflict(struct rt_addrinfo *info, unsigned int tableid)
> +{
> +#ifdef ART
...
> +         (rtable_mpath_next(rt) != NULL)) {
...
> +#endif /* ART */

rtable_mpath_next() is not defined with SMALL_KERNEL.  You need
another #ifndef here or RAMDISK kernel will break when we enable
ART there.


> @@ -698,8 +698,20 @@ arplookup(u_int32_t addr, int create, in
> +#ifdef ART
...
> +             while ((mrt = rtable_mpath_next(mrt)) != NULL) {
...
> +#endif /* ART */

same here

with that OK bluhm@

Reply via email to