diff options
author | Francois Dumontet <francois.dumontet@6wind.com> | 2023-08-29 17:53:26 +0200 |
---|---|---|
committer | Francois Dumontet <francois.dumontet@6wind.com> | 2023-10-24 17:16:47 +0200 |
commit | 83ca9a605eb51b675fa19247acf23e93c7abf590 (patch) | |
tree | eec42debfe3bfbaa07481cbfb4c1eed41d4de4af /bgpd/bgp_vty.c | |
parent | Merge pull request #14607 from mobash-rasool/fixes2 (diff) | |
download | frr-83ca9a605eb51b675fa19247acf23e93c7abf590.tar.xz frr-83ca9a605eb51b675fa19247acf23e93c7abf590.zip |
bgpd: add [no] bgp snmp traps rfc4273 command
There is no cli command to prevent the router to send traps
implemented in the rfc4273. If not done, when introducing
the traps from bgp4v2mib, traps will be send for each of
the two mibs: there will be redundancy in the sent information.
Add a new command:
- [no] bgp snmp traps rfc4273
Using this command will allow or not the notification of
the following traps:
- bgpEstablishedNotification
- bgpBackwardTransNotification
Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
Diffstat (limited to 'bgpd/bgp_vty.c')
-rw-r--r-- | bgpd/bgp_vty.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 8144d6e7b..49213bcfb 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -128,6 +128,7 @@ DEFINE_HOOK(bgp_inst_config_write, (bgp, vty)); DEFINE_HOOK(bgp_snmp_update_last_changed, (struct bgp *bgp), (bgp)); DEFINE_HOOK(bgp_snmp_init_stats, (struct bgp *bgp), (bgp)); +DEFINE_HOOK(bgp_snmp_traps_config_write, (struct vty * vty), (vty)); static struct peer_group *listen_range_exists(struct bgp *bgp, struct prefix *range, int exact); @@ -18477,6 +18478,8 @@ int bgp_config_write(struct vty *vty) safi_t safi; uint32_t tovpn_sid_index = 0; + hook_call(bgp_snmp_traps_config_write, vty); + if (bm->rmap_update_timer != RMAP_DEFAULT_UPDATE_TIMER) vty_out(vty, "bgp route-map delay-timer %u\n", bm->rmap_update_timer); |