On 2016 Apr 04 (Mon) at 18:07:52 +0100 (+0100), Stuart Henderson wrote:
:On 2016/03/31 12:40, Peter Hessler wrote:
:> We see occasional bgpd deaths during boot. This is apparently caused by
:> a race with ospfd starting up.
:>
:> The underlying problem is we are reciving a CHANGE route message for an
:> MPATH path, where the gateway doesn't match the route message. In our
:> case, the prefix is assigned to a Connected (and Backup/Down) carp
:> device, and we are reciving routes for it from several of our ospf
:> neighbors.
:>
:> ospfd simply treats those as an "add" instead of a "change". I would
:> like to do the same thing in bgpd.
:>
:> OK?
:
:I've run into this a few times in the past. Working for me so far,
:unless anyone has concerns I think this should go in as it's quite a
:nasty failure mode for people with multipath configured.
:
We don't have the multipath sysctl enabled on our routers, but we do have
the flag set on some routes, because we are also running ospfd on those
systems. ospfd seems to set the flag for all routes that it installs
into the fib.
:
:> Index: usr.sbin/bgpd/kroute.c
:> ===================================================================
:> RCS file: /cvs/src/usr.sbin/bgpd/kroute.c,v
:> retrieving revision 1.207.2.1
:> diff -u -p -u -p -r1.207.2.1 kroute.c
:> --- usr.sbin/bgpd/kroute.c 23 Mar 2016 13:41:37 -0000 1.207.2.1
:> +++ usr.sbin/bgpd/kroute.c 31 Mar 2016 10:37:05 -0000
:> @@ -3251,7 +3251,7 @@ dispatch_rtmsg_addr(struct rt_msghdr *rt
:> (kr = kroute_matchgw(kr, sa_in)) == NULL) {
:> log_warnx("dispatch_rtmsg_addr[change] "
:> "mpath route not found");
:> - return (-1);
:> + goto add4;
:> } else if (mpath && rtm->rtm_type == RTM_ADD)
:> goto add4;
:>
:> @@ -3323,7 +3323,7 @@ add4:
:> NULL) {
:> log_warnx("dispatch_rtmsg[change] "
:> "IPv6 mpath route not found");
:> - return (-1);
:> + goto add6;
:> } else if (mpath && rtm->rtm_type == RTM_ADD)
:> goto add6;
:>
:>
:> --
:> If A equals success, then the formula is _A = _X + _Y + _Z. _X is
work. _Y
:> is play. _Z is keep your mouth shut.
:> -- Albert Einstein
:>
--
The chain which can be yanked is not the eternal chain.
-- G. Fitch