I came up with this diff to overcome my problem.

Index: rtable.c
===================================================================
RCS file: /cvs/src/sys/net/rtable.c,v
retrieving revision 1.75
diff -u -p -r1.75 rtable.c
--- rtable.c    25 May 2021 22:45:09 -0000      1.75
+++ rtable.c    7 Nov 2021 11:21:33 -0000
@@ -834,6 +834,10 @@ rtable_mpath_insert(struct art_node *an,
                return;
        }
 
+       /* Unreachable on-link route will not preferred */
+       if (ISSET(mrt->rt_flags, RTF_LLINFO|RTF_REJECT))
+               prio = 0;
+
        /* Iterate until we find the route to be placed after ``rt''. */
        while (mrt->rt_priority <= prio && SRPL_NEXT_LOCKED(mrt, rt_next)) {
                prt = mrt;

Le Sun, Nov 07, 2021 at 10:11:54AM +0100, Denis Fondras a écrit :
> Hi,
> 
> I am using BGP to connect 2 OpenBSD-current routers :
> 
> [static default GW]---RT1---[bgp]---RT2
> 
> I announce an IPv4 /32 from RT2.
> After I start both RT1 and RT2, traffic flows to RT2 /32 without any issue.
> However if I reboot RT2 (let's say for sysupgrade), RT1 loses the /32 (which 
> is
> expected) but as traffic is still directed to the /32 (because of a constant
> ping towards the /32 for example), RT1 installs a route for the /32 with these
> flags :
> 
> flags: <UP,HOST,REJECT,DONE,LLINFO,CLONED>
> (The REJECT flag is dropped after a timeout but comes back a few second later)
> 
> From there I cannot get the back /32 from BGP until I manually delete the
> automatically installed HOST route. Is there any way to deal with it without
> manual intervention ?
> 
> Denis

Reply via email to