diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2021-07-27 16:12:04 +0200 |
|---|---|---|
| committer | Adriano Marto Reis <adrianomarto@gmail.com> | 2023-10-10 08:00:08 +1000 |
| commit | 3d1482a9451039d94dce91f25dac8334354e1f92 (patch) | |
| tree | 5a939be6d23b7fa3ad053a8bdfc1d6113c118b7a /ospf6d/ospf6_interface.c | |
| parent | f5917bae53cee2367d97ae5712a0e18065981252 (diff) | |
ospf6d: option to disable multicast hellos
With the configured neighbor list, unicast hellos can be sent. Allow
disabling multicast hellos for that scenario.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_interface.c')
| -rw-r--r-- | ospf6d/ospf6_interface.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index 0fef0c95d4..2cd7ba5638 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -2673,6 +2673,33 @@ DEFPY (ipv6_ospf6_p2xp_only_cfg_neigh, return CMD_SUCCESS; } +DEFPY (ipv6_ospf6_p2xp_no_multicast_hello, + ipv6_ospf6_p2xp_no_multicast_hello_cmd, + "[no] ipv6 ospf6 p2p-p2mp disable-multicast-hello", + NO_STR + IP6_STR + OSPF6_STR + "Point-to-point and Point-to-Multipoint parameters\n" + "Do not send multicast hellos\n") +{ + VTY_DECLVAR_CONTEXT(interface, ifp); + struct ospf6_interface *oi = ifp->info; + + if (no) { + if (!oi) + return CMD_SUCCESS; + + oi->p2xp_no_multicast_hello = false; + return CMD_SUCCESS; + } + + if (!oi) + oi = ospf6_interface_create(ifp); + + oi->p2xp_no_multicast_hello = true; + return CMD_SUCCESS; +} + static int config_write_ospf6_interface(struct vty *vty, struct vrf *vrf) { @@ -2746,6 +2773,10 @@ static int config_write_ospf6_interface(struct vty *vty, struct vrf *vrf) vty_out(vty, " ipv6 ospf6 p2p-p2mp config-neighbors-only\n"); + if (oi->p2xp_no_multicast_hello) + vty_out(vty, + " ipv6 ospf6 p2p-p2mp disable-multicast-hello\n"); + ospf6_bfd_write_config(vty, oi); ospf6_auth_write_config(vty, &oi->at_data); @@ -2871,6 +2902,8 @@ void ospf6_interface_init(void) install_element(INTERFACE_NODE, &no_ipv6_ospf6_network_cmd); install_element(INTERFACE_NODE, &ipv6_ospf6_p2xp_only_cfg_neigh_cmd); + install_element(INTERFACE_NODE, + &ipv6_ospf6_p2xp_no_multicast_hello_cmd); /* reference bandwidth commands */ install_element(OSPF6_NODE, &auto_cost_reference_bandwidth_cmd); |
