mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-03 19:51:09 +00:00
ospf6d: fix using vrf interface as a loopback
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
parent
7d4651cc9c
commit
d16cff32b2
@ -109,7 +109,7 @@ static uint8_t ospf6_default_iftype(struct interface *ifp)
|
|||||||
{
|
{
|
||||||
if (if_is_pointopoint(ifp))
|
if (if_is_pointopoint(ifp))
|
||||||
return OSPF_IFTYPE_POINTOPOINT;
|
return OSPF_IFTYPE_POINTOPOINT;
|
||||||
else if (if_is_loopback(ifp))
|
else if (if_is_loopback_or_vrf(ifp))
|
||||||
return OSPF_IFTYPE_LOOPBACK;
|
return OSPF_IFTYPE_LOOPBACK;
|
||||||
else
|
else
|
||||||
return OSPF_IFTYPE_BROADCAST;
|
return OSPF_IFTYPE_BROADCAST;
|
||||||
@ -390,7 +390,7 @@ void ospf6_interface_state_update(struct interface *ifp)
|
|||||||
|
|
||||||
if (if_is_operative(ifp)
|
if (if_is_operative(ifp)
|
||||||
&& (ospf6_interface_get_linklocal_address(oi->interface)
|
&& (ospf6_interface_get_linklocal_address(oi->interface)
|
||||||
|| if_is_loopback(oi->interface)))
|
|| if_is_loopback_or_vrf(oi->interface)))
|
||||||
thread_execute(master, interface_up, oi, 0);
|
thread_execute(master, interface_up, oi, 0);
|
||||||
else
|
else
|
||||||
thread_execute(master, interface_down, oi, 0);
|
thread_execute(master, interface_down, oi, 0);
|
||||||
@ -734,7 +734,7 @@ int interface_up(struct thread *thread)
|
|||||||
|
|
||||||
/* check interface has a link-local address */
|
/* check interface has a link-local address */
|
||||||
if (!(ospf6_interface_get_linklocal_address(oi->interface)
|
if (!(ospf6_interface_get_linklocal_address(oi->interface)
|
||||||
|| if_is_loopback(oi->interface))) {
|
|| if_is_loopback_or_vrf(oi->interface))) {
|
||||||
if (IS_OSPF6_DEBUG_INTERFACE)
|
if (IS_OSPF6_DEBUG_INTERFACE)
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"Interface %s has no link local address, can't execute [InterfaceUp]",
|
"Interface %s has no link local address, can't execute [InterfaceUp]",
|
||||||
@ -800,7 +800,7 @@ int interface_up(struct thread *thread)
|
|||||||
|
|
||||||
/* Schedule Hello */
|
/* Schedule Hello */
|
||||||
if (!CHECK_FLAG(oi->flag, OSPF6_INTERFACE_PASSIVE)
|
if (!CHECK_FLAG(oi->flag, OSPF6_INTERFACE_PASSIVE)
|
||||||
&& !if_is_loopback(oi->interface)) {
|
&& !if_is_loopback_or_vrf(oi->interface)) {
|
||||||
oi->thread_send_hello = NULL;
|
oi->thread_send_hello = NULL;
|
||||||
thread_add_event(master, ospf6_hello_send, oi, 0,
|
thread_add_event(master, ospf6_hello_send, oi, 0,
|
||||||
&oi->thread_send_hello);
|
&oi->thread_send_hello);
|
||||||
@ -2106,7 +2106,7 @@ DEFUN (no_ipv6_ospf6_passive,
|
|||||||
THREAD_OFF(oi->thread_sso);
|
THREAD_OFF(oi->thread_sso);
|
||||||
|
|
||||||
/* don't send hellos over loopback interface */
|
/* don't send hellos over loopback interface */
|
||||||
if (!if_is_loopback(oi->interface))
|
if (!if_is_loopback_or_vrf(oi->interface))
|
||||||
thread_add_event(master, ospf6_hello_send, oi, 0,
|
thread_add_event(master, ospf6_hello_send, oi, 0,
|
||||||
&oi->thread_send_hello);
|
&oi->thread_send_hello);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user