diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2022-09-08 19:41:02 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2022-10-03 20:18:12 +0200 |
commit | 54430df953d6c590e5f446530a21d18277eeda56 (patch) | |
tree | a3c99a8596c3d864bef40d87ddf8f82f9e9b17e0 /proto/bgp/packets.c | |
parent | 605ff0a0ebdd32b1a98316737c3e65acb528a156 (diff) |
BGP: Do not assume that all channels are struct bgp_channel
In principle, the channel list is a list of parent struct proto and can
contain general structures of type struct channel, That is useful e.g.
for adding MPLS channels to BGP.
Diffstat (limited to 'proto/bgp/packets.c')
-rw-r--r-- | proto/bgp/packets.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index 3aa62c39..fc23897d 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -262,7 +262,7 @@ bgp_prepare_capabilities(struct bgp_conn *conn) } /* Allocate and fill per-AF fields */ - WALK_LIST(c, p->p.channels) + BGP_WALK_CHANNELS(p, c) { ac = &caps->af_data[caps->af_count++]; ac->afi = c->afi; @@ -681,7 +681,7 @@ bgp_check_capabilities(struct bgp_conn *conn) /* This is partially overlapping with bgp_conn_enter_established_state(), but we need to run this just after we receive OPEN message */ - WALK_LIST(c, p->p.channels) + BGP_WALK_CHANNELS(p, c) { const struct bgp_af_caps *loc = bgp_find_af_caps(local, c->afi); const struct bgp_af_caps *rem = bgp_find_af_caps(remote, c->afi); |