From 88bbd69c04b4f268b59eb0580c946ba3dd01666a Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Wed, 17 Dec 2008 14:57:01 +0000 Subject: Add a workaround for some crazyness that happens if a cloning route has a low priority gateway route below itself plus a carp interface on the same network. The result is that some arp entries can't be added. This is a bandaid that will give me time to figure out the real bug. --- usr.sbin/ospfd/kroute.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'usr.sbin') diff --git a/usr.sbin/ospfd/kroute.c b/usr.sbin/ospfd/kroute.c index ac71ef3d207..9b5cc0ffff6 100644 --- a/usr.sbin/ospfd/kroute.c +++ b/usr.sbin/ospfd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.62 2008/12/12 22:43:17 claudio Exp $ */ +/* $OpenBSD: kroute.c,v 1.63 2008/12/17 14:57:00 claudio Exp $ */ /* * Copyright (c) 2004 Esben Norby @@ -1015,6 +1015,7 @@ if_announce(void *msg) int send_rtmsg(int fd, int action, struct kroute *kroute) { + struct kroute_node *rn; struct iovec iov[5]; struct rt_msghdr hdr; struct sockaddr_in prefix; @@ -1027,6 +1028,11 @@ send_rtmsg(int fd, int action, struct kroute *kroute) if (kr_state.fib_sync == 0) return (0); + /* XXX workaround for bug with CLONING routes */ + rn = kroute_find(kroute->prefix.s_addr, kroute->prefixlen, RTP_ANY); + if (rn && rn->r.priority < RTP_STATIC) + return (0); + /* initialize header */ bzero(&hdr, sizeof(hdr)); hdr.rtm_version = RTM_VERSION; -- cgit v1.2.3