Found by asou at soum.co.jp.
ok claudio mpi akoshibe benno
-/* $OpenBSD: if.c,v 1.559 2018/08/09 03:35:19 akoshibe Exp $ */
+/* $OpenBSD: if.c,v 1.560 2018/09/08 01:03:59 yasuoka Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
if (rdomain < 0 || rdomain > RT_TABLEID_MAX)
return (EINVAL);
- if ((ifp->if_flags & IFF_LOOPBACK) &&
+ if (rdomain != ifp->if_rdomain &&
+ (ifp->if_flags & IFF_LOOPBACK) &&
(ifp->if_index == rtable_loindex(ifp->if_rdomain)))
return (EPERM);