summaryrefslogtreecommitdiff
path: root/proto/bgp/bgp.h
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2022-09-08 19:41:02 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2022-10-03 20:18:12 +0200
commit54430df953d6c590e5f446530a21d18277eeda56 (patch)
treea3c99a8596c3d864bef40d87ddf8f82f9e9b17e0 /proto/bgp/bgp.h
parent605ff0a0ebdd32b1a98316737c3e65acb528a156 (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/bgp.h')
-rw-r--r--proto/bgp/bgp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/proto/bgp/bgp.h b/proto/bgp/bgp.h
index 15a759fb..5d0e9791 100644
--- a/proto/bgp/bgp.h
+++ b/proto/bgp/bgp.h
@@ -485,6 +485,9 @@ struct bgp_parse_state {
#define BGP_RX_BUFFER_EXT_SIZE 65535
#define BGP_TX_BUFFER_EXT_SIZE 65535
+#define BGP_CF_WALK_CHANNELS(P,C) WALK_LIST(C, P->c.channels) if (C->c.channel == &channel_bgp)
+#define BGP_WALK_CHANNELS(P,C) WALK_LIST(C, P->p.channels) if (C->c.channel == &channel_bgp)
+
static inline int bgp_channel_is_ipv4(struct bgp_channel *c)
{ return BGP_AFI(c->afi) == BGP_AFI_IPV4; }