On Thu, Jun 09, 2022 at 04:53:46PM +0200, Claudio Jeker wrote:
> Noticed that similar to fib_prio the rdomain id is passed around to some
> places where it really makes no sense.
> 
> First of all kr_nexthop_add() and kr_nexthop_delete() can be simplified.
> The imsg peerid is always 0. This was added in the beginning of L3VPN
> support without realizing that all bgp nexthops live in the same rdomain.
> So simplify this code path.
> 
> Then kr_shutdown() should just nuke all tables, passing one for good
> measures makes again little sense. Similar reason for kr_dispatch_msg().
> 
> Now all those function had this extra variable because of kif_remove().
> kif_remove needs to know the ktable where the connected routes live in.
> Now this is simply the rdomain id of the interface. No other table should
> have a connected route to this interface.

The reasoning seems sound and the code changes match what you describe.

> Nexthop lookups need more work but this should work well enough for now.

ok with me.

Reply via email to