summaryrefslogtreecommitdiff
path: root/proto/bgp/attrs.c
diff options
context:
space:
mode:
authorTrisha Biswas <tbiswas@fastly.com>2023-04-14 04:28:37 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2023-04-14 04:28:37 +0200
commit9e44ace3928a19560058dc713fcbff3a8bad3b3c (patch)
treea67a8a28a0b2c8a394a948977fbecaef7f7e1de1 /proto/bgp/attrs.c
parentdc139fb6438f0864e83a9dc71e7c212c5acaf3ef (diff)
BGP: Add 'allow bgp_med' option for EBGP sessions
This option allows to treat bgp_med as regular transitive attribute on EBGP sessions (without hacks in filters). Minor changes from committer.
Diffstat (limited to 'proto/bgp/attrs.c')
-rw-r--r--proto/bgp/attrs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c
index 1e234b16..204151c3 100644
--- a/proto/bgp/attrs.c
+++ b/proto/bgp/attrs.c
@@ -1834,7 +1834,7 @@ bgp_update_attrs(struct bgp_proto *p, struct bgp_channel *c, rte *e, ea_list *at
/* MULTI_EXIT_DESC attribute - accept only if set in export filter */
a = bgp_find_attr(attrs0, BA_MULTI_EXIT_DISC);
- if (a && !(a->fresh))
+ if (a && !a->fresh && !p->cf->allow_med)
bgp_unset_attr(&attrs, pool, BA_MULTI_EXIT_DISC);
}