Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSPF still announce route from removed vifX.XX interface on xen network environment #1

Closed
perfect-solutions opened this issue Apr 22, 2018 · 5 comments

Comments

@perfect-solutions
Copy link
Owner

perfect-solutions commented Apr 22, 2018

Overview:

Rus: OSPF продолжает анонсировать маршрут после удаления интерфейса vifX.XX
Eng: OSPF still announce route from removed vifX.XX interface on xen network environment

UPD1 Rus: kernel-маршруты через tap интерфейсы, при использовании openvpn ведут себя так же
UPD1 Eng: tap interfaces with openvpn already affected

Environment:

  • Xen 4.x, routed network
  • PV domU generates vifX.XX interfaces.
  • Thorught vifX.XX interface we have /32 route to IP-address of DomU
  • Quagga (zebra+ospf) redistribute this kernel routes to OSPF

DomU is up

linux:

 ip ro li | grep 10.13.1.12
 10.13.1.12 dev vif14.0  scope link  src 10.13.1.1

quagga:

 # show ip route kernel
 ...
 K>* 10.13.1.12/32 is directly connected, vif14.0

After shutdown DomU

linux:

 ip ro li | grep 10.13.1.12 | wc -l 
 0

quagga:

 # show ip route kernel
 ...
 K * 10.13.1.12/32 is directly connected, unknown inactive

After vif14.0 up with new ip and new domU

linux:

 ip ro li | grep 10.13.1.12 | wc -l 
 0

quagga:

 # show ip route kernel
 ...
 K>* 10.13.1.12/32 is directly connected, vif14.0

in OSPF this route is announced to neighbors....

@perfect-solutions perfect-solutions changed the title OSPF still announce route from removed vifX.XX interface on xen network environment / OSPF продолжает анонсировать маршрут после удаления интерфейса vifX.XX / (tap interfaces with openvpn already affected) OSPF still announce route from removed vifX.XX interface on xen network environment Apr 22, 2018
@perfect-solutions
Copy link
Owner Author

OpenVPN case for reproduce:

  1. start openvpn (192.168.3.1 is remote router).
  2. ip ro add 8.8.8.8 via 192.168.3.1
  3. show ip route kernel displays both routes
  4. killall -9 openvpn, interfaces disappear
  5. show ip route kernel, displays 8.8.8.8 as "unknown inactive"
  6. restart openvpn, interfaces with old name is appear
  7. show ip route kernel, displays 8.8.8.8 as routed via tap1, active, ospf is redistributes it.
  8. ip ro li | grep 8.8.8.8 | wc -l is zero, route real not exists

@perfect-solutions
Copy link
Owner Author

After enable debug, and after add debug output in rib_gc_dest....

route to (8.8.8.8 openvpn) / (10.13.1.12 xen) is not deleted by "rib_can_delete_dest" call.

in rib_can_delete_dest condition for returns zero is "if (dest->routes)"

@perfect-solutions
Copy link
Owner Author

In commit 08b6089 added condition for remove died routes and debug logging:

2018/04/22 14:00:18 ZEBRA: check_is_disabled_static: kernel route with refcnt=0
2018/04/22 14:00:18 ZEBRA: check_is_disabled_static: kernel route with ifname=(null)
2018/04/22 14:00:18 ZEBRA: check_is_disabled_static: kernel route with index=16, if pointer=0
2018/04/22 14:00:18 ZEBRA: check_is_disabled_static: allow to remove Kernel route thourght removed interface

Current routes is removed successfully after interface is removed from OS

@perfect-solutions
Copy link
Owner Author

Quagga#2 pool request sended

@perfect-solutions
Copy link
Owner Author

Patch for debian created, testing...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant