diff options
| author | Russ White <russ@riw.us> | 2023-02-21 08:03:06 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-21 08:03:06 -0500 |
| commit | 62bd2580e3e7934d3512b6a88aaf93528a1d2f26 (patch) | |
| tree | a41517de9fb95bd4e1620dc16c0be7e64f9b6de3 /ospfd/ospf_packet.c | |
| parent | ba755d35e508c2452e5459bdd7c0dd67a70a88a4 (diff) | |
| parent | 044561b1bb14432f20e3e9d5077964f4e7486972 (diff) | |
Merge pull request #12366 from manojvn/ospfv2-flood-reduction
ospfd: Support OSPF Refresh and Flooding Reduction RFC4136.
Diffstat (limited to 'ospfd/ospf_packet.c')
| -rw-r--r-- | ospfd/ospf_packet.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index 4c2f5d72b3..5268c9896b 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -28,6 +28,7 @@ #include "ospfd/ospf_network.h" #include "ospfd/ospf_interface.h" #include "ospfd/ospf_ism.h" +#include "ospfd/ospf_abr.h" #include "ospfd/ospf_asbr.h" #include "ospfd/ospf_lsa.h" #include "ospfd/ospf_lsdb.h" @@ -3317,6 +3318,14 @@ static int ospf_make_hello(struct ospf_interface *oi, struct stream *s) else stream_putw(s, 0); /* hello-interval of 0 for fast-hellos */ + /* Check if flood-reduction is enabled, + * if yes set the DC bit in the options. + */ + if (OSPF_FR_CONFIG(oi->ospf, oi->area)) + SET_FLAG(OPTIONS(oi), OSPF_OPTION_DC); + else if (CHECK_FLAG(OPTIONS(oi), OSPF_OPTION_DC)) + UNSET_FLAG(OPTIONS(oi), OSPF_OPTION_DC); + if (IS_DEBUG_OSPF_EVENT) zlog_debug("%s: options: %x, int: %s", __func__, OPTIONS(oi), IF_NAME(oi)); @@ -3405,6 +3414,8 @@ static int ospf_make_db_desc(struct ospf_interface *oi, options = OPTIONS(oi); if (CHECK_FLAG(oi->ospf->config, OSPF_OPAQUE_CAPABLE)) SET_FLAG(options, OSPF_OPTION_O); + if (OSPF_FR_CONFIG(oi->ospf, oi->area)) + SET_FLAG(options, OSPF_OPTION_DC); stream_putc(s, options); /* DD flags */ |
