mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
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>
This commit is contained in:
parent
f5917bae53
commit
3d1482a945
|
@ -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);
|
||||
|
|
|
@ -70,6 +70,8 @@ struct ospf6_interface {
|
|||
|
||||
/* P2P/P2MP behavior: */
|
||||
|
||||
/* disable hellos on standard multicast? */
|
||||
bool p2xp_no_multicast_hello;
|
||||
/* only allow explicitly configured neighbors? */
|
||||
bool p2xp_only_cfg_neigh;
|
||||
|
||||
|
|
|
@ -2284,6 +2284,13 @@ void ospf6_hello_send(struct event *thread)
|
|||
return;
|
||||
}
|
||||
|
||||
event_add_timer(master, ospf6_hello_send, oi, oi->hello_interval,
|
||||
&oi->thread_send_hello);
|
||||
|
||||
if (oi->state == OSPF6_INTERFACE_POINTTOPOINT
|
||||
&& oi->p2xp_no_multicast_hello)
|
||||
return 0;
|
||||
|
||||
op = ospf6_packet_new(oi->ifmtu);
|
||||
|
||||
ospf6_make_header(OSPF6_MESSAGE_TYPE_HELLO, oi, op->s);
|
||||
|
@ -2311,10 +2318,6 @@ void ospf6_hello_send(struct event *thread)
|
|||
*/
|
||||
ospf6_packet_add_top(oi, op);
|
||||
|
||||
/* set next thread */
|
||||
event_add_timer(master, ospf6_hello_send, oi, oi->hello_interval,
|
||||
&oi->thread_send_hello);
|
||||
|
||||
OSPF6_MESSAGE_WRITE_ON(oi);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue