diff options
author | glebius <glebius@FreeBSD.org> | 2005-03-10 15:26:45 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2005-03-10 15:26:45 +0000 |
commit | 53e474b9c4b6d81940a4dc0a88d7aa091d48af89 (patch) | |
tree | 6e81dca20b82ee63e88c04b9926a870b28d76e7e /sys/netinet/in.c | |
parent | 188f70d7e9a2b953c76fea7da86f60a2320cbcfe (diff) | |
download | FreeBSD-src-53e474b9c4b6d81940a4dc0a88d7aa091d48af89.zip FreeBSD-src-53e474b9c4b6d81940a4dc0a88d7aa091d48af89.tar.gz |
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.
Diffstat (limited to 'sys/netinet/in.c')
-rw-r--r-- | sys/netinet/in.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c index dc2a443..3b81d0a 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -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); |