diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2022-07-20 12:43:28 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2022-07-20 12:43:28 +0000 |
commit | 9e1171444ebb6c35817a90344a26f8365606c78b (patch) | |
tree | 00f7edff6f1cac92682dedebe736d4672a5eddd7 /usr.sbin/bgpd/bgpd.c | |
parent | fe829b3c4c4d2f7333653114120abd4bc7b15b9b (diff) |
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@
Diffstat (limited to 'usr.sbin/bgpd/bgpd.c')
-rw-r--r-- | usr.sbin/bgpd/bgpd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/bgpd.c b/usr.sbin/bgpd/bgpd.c index 2d97a7ac38f..cb42e5d83e3 100644 --- a/usr.sbin/bgpd/bgpd.c +++ b/usr.sbin/bgpd/bgpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.c,v 1.248 2022/06/23 13:09:03 claudio Exp $ */ +/* $OpenBSD: bgpd.c,v 1.249 2022/07/20 12:43:27 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -599,7 +599,9 @@ send_config(struct bgpd_config *conf) reconfpending = 3; /* one per child */ - expand_networks(conf); + expand_networks(conf, &conf->networks); + SIMPLEQ_FOREACH(vpn, &conf->l3vpns, entry) + expand_networks(conf, &vpn->net_l); cflags = conf->flags; |