Cleanup and fix the network code.
authorclaudio <claudio@openbsd.org>
Wed, 20 Jul 2022 12:43:27 +0000 (12:43 +0000)
committerclaudio <claudio@openbsd.org>
Wed, 20 Jul 2022 12:43:27 +0000 (12:43 +0000)
commit8bf72ef002061ab4c21adeb9a38b1ea24828da50
tree37dca5528eea190ccb97bea6baa9c50ac7e7e174
parent27806e7687ff63b302e0e906b19d48e3b78f5bae
Cleanup and fix the network code.

- introduce network_free() to properly free a network struct including
  the possible rtlabel reference.
- change expand_networks() and the reload code to not only expand the
  main network config but also the network configs inside L3VPN sections.
- adjust reload logic to properly match any kind of network struct.
  Up until now rtlabel and priority network statememnts were not correctly
  reloaded.
OK tb@
usr.sbin/bgpd/bgpd.c
usr.sbin/bgpd/bgpd.h
usr.sbin/bgpd/config.c
usr.sbin/bgpd/kroute.c