On 29/01/18(Mon) 20:40, Remi Locherer wrote: > On Mon, Jan 29, 2018 at 07:33:47PM +0100, Remi Locherer wrote: > > > Problem Description > > Local originating traffic leaves the system on the wrong interface > > after a more specific route was added. This is problematic for services > > like dhcrelay and syslogd. > > > > I verified this on iced this on OpenBSD 6.1 but do not know how if was with > > older versions. The behaviour is still the same with current. > > What I wanted to write: > I verified this behaviour on OpenBSD 6.1, 6.2 and -current. I do not know > if it was different with older releases.
I believe it's the same. When you're adding a most specific route there's no mechanism to "invalidate" less specific routes. What could be done when adding the new route is: - lookup the second most specific (default in your case). - insert the new route (172.30.1.0/24 in your case) - remove & reinsert the second most specific and its MPATH siblings. This should make the ip_output() realize the default route it was using is no longer valid (rt_isvalid() returns false), do a new route lookup and fetch the newly added entry.
