Add antifootshooting workaround, which will make all routes "connected"

to carp(4) interfaces host routes. This prevents a problem, when connected
network is routed to carp(4) interface.
This commit is contained in:
Gleb Smirnoff 2005-03-10 15:26:45 +00:00
parent 6dfe1d848e
commit 0504a89fdd

View File

@ -739,6 +739,12 @@ in_ifinit(ifp, ia, sin, scrub)
return (0);
flags |= RTF_HOST;
}
/*
* XXX: A route to network should never point to a carp(4)
* interface. Use only host route for CARP address.
*/
if (ifp->if_type == IFT_CARP)
flags |= RTF_HOST;
if ((error = in_addprefix(ia, flags)) != 0)
return (error);