On 21/07/17(Fri) 12:13, Remi Locherer wrote:
> [...]
> Somebody suggested in a private mail to use /32 masks for carp interfaces.
> This fix/workaround helps indeed!
Good to know! However from my developer's chair there's still a bug.
Nothing should happen to a route attached to vio1 when you modify
something on carp1.
Could you repeat the "route monitor" steps with a kernel containing the
diff below?
Index: net/route.c
===================================================================
RCS file: /cvs/src/sys/net/route.c,v
retrieving revision 1.360
diff -u -p -r1.360 route.c
--- net/route.c 24 Jul 2017 09:20:32 -0000 1.360
+++ net/route.c 24 Jul 2017 12:19:23 -0000
@@ -627,7 +627,7 @@ rtdeletemsg(struct rtentry *rt, struct i
{
int error;
struct rt_addrinfo info;
- unsigned int ifidx;
+ struct sockaddr_rtlabel sa_rl;
struct sockaddr_in6 sa_mask;
KASSERT(rt->rt_ifidx == ifp->if_index);
@@ -637,16 +637,18 @@ rtdeletemsg(struct rtentry *rt, struct i
* deleted. That will allow the information being reported to
* be accurate (and consistent with route_output()).
*/
- bzero((caddr_t)&info, sizeof(info));
+ memset(&info, 0, sizeof(info));
info.rti_info[RTAX_DST] = rt_key(rt);
+ info.rti_info[RTAX_GATEWAY] = rt->rt_gateway;
if (!ISSET(rt->rt_flags, RTF_HOST))
info.rti_info[RTAX_NETMASK] = rt_plen2mask(rt, &sa_mask);
- info.rti_info[RTAX_GATEWAY] = rt->rt_gateway;
+ info.rti_info[RTAX_LABEL] = rtlabel_id2sa(rt->rt_labelid, &sa_rl);
info.rti_flags = rt->rt_flags;
- ifidx = rt->rt_ifidx;
+ info.rti_info[RTAX_IFP] = sdltosa(ifp->if_sadl);
+ info.rti_info[RTAX_IFA] = rt->rt_ifa->ifa_addr;
error = rtrequest_delete(&info, rt->rt_priority, ifp, &rt, tableid);
KERNEL_LOCK();
- rtm_miss(RTM_DELETE, &info, info.rti_flags, rt->rt_priority, ifidx,
+ rtm_miss(RTM_DELETE, &info, rt->rt_flags, rt->rt_priority, rt->rt_ifidx,
error, tableid);
KERNEL_UNLOCK();
if (error == 0)