The route cannot be found because uv_ifindex is changed
Closed this issue · 3 comments
Hi!I am using PIMD on an LTE-enabled router and I have a problem. When my LTE module goes offline, after a period of time, the LTE module recovers and PIMD is unable to find the upstream route.
I added some prints in getms(), and by log, I suspect that uv_ifindex changed, but the lack of updates in PIMD caused the problem.
The log is as follows:
pimd: 02:55:07.621 Received PIM HELLO from new neighbor 51.1.1.1
pimd: 02:55:07.621 ------12
pimd: 02:55:07.622 ------12
pimd: 02:55:07.622 k_req_incoming: ask path to 10.10.10.254
pimd: 02:55:07.622 ------24
pimd: 02:55:07.622 netlink: vif 2, ifindex=24
pimd: 02:55:07.622 netlink: gateway is 51.1.1.1
pimd: 02:55:07.622 k_req_incoming: ask path to 10.10.10.254
pimd: 02:55:07.622 ------24
pimd: 02:55:07.622 netlink: vif 2, ifindex=24
pimd: 02:55:07.622 netlink: gateway is 51.1.1.1
pimd: 02:55:07.623 For src 10.10.10.254, iif is gre4-tunnel1, next hop router is 51.1.1.1
pimd: 02:55:07.623 Sending PIM HELLO to new neighbor 51.1.1.1
pimd: 02:55:07.623 Sending PIM HELLO on gre4-tunnel1
pimd: 02:55:07.623 SENT 46 bytes PIM v2 Hello from 51.1.1.2 to 224.0.0.13
pimd: 02:55:07.623 All routers in 51.1.1.2 segment support DR Priority based DR election.
pimd: 02:55:07.623 Using fallback DR election on gre4-tunnel1.
pimd: 02:55:07.623 RECV 46 bytes PIM v2 Hello from 51.1.1.2 to 224.0.0.13
pimd: 02:55:09.626 Sending IGMP v3 query on br-lan.1
pimd: 02:55:09.626 Send IGMP Membership Query from 192.168.1.1 to 224.0.0.1
pimd: 02:55:09.627 SENT 36 bytes IGMP Membership Query from 192.168.1.1 to 224.0.0.1
pimd: 02:55:09.627 Sending IGMP v3 query on gre4-tunnel1
pimd: 02:55:09.627 Send IGMP Membership Query from 51.1.1.2 to 224.0.0.1
pimd: 02:55:09.627 SENT 36 bytes IGMP Membership Query from 51.1.1.2 to 224.0.0.1
pimd: 02:55:09.627 Received IGMP Membership Query from 192.168.1.1 to 224.0.0.1
pimd: 02:55:09.628 Received IGMP Membership Query from 51.1.1.2 to 224.0.0.1
pimd: 02:55:14.630 Sending IGMP v3 query on br-lan.1
pimd: 02:55:14.630 Send IGMP Membership Query from 192.168.1.1 to 224.0.0.1
pimd: 02:55:14.631 SENT 36 bytes IGMP Membership Query from 192.168.1.1 to 224.0.0.1
pimd: 02:55:14.632 Sending IGMP v3 query on gre4-tunnel1
pimd: 02:55:14.632 Send IGMP Membership Query from 51.1.1.2 to 224.0.0.1
pimd: 02:55:14.633 SENT 36 bytes IGMP Membership Query from 51.1.1.2 to 224.0.0.1
pimd: 02:55:14.633 Received IGMP Membership Query from 192.168.1.1 to 224.0.0.1
pimd: 02:55:14.634 Received IGMP Membership Query from 51.1.1.2 to 224.0.0.1
pimd: 02:55:18.469 Received IGMP v3 Membership Report from 192.168.1.112 to 224.0.0.22
pimd: 02:55:18.469 IGMP v3 report, 16 bytes, from 192.168.1.112 to 224.0.0.22 with 1 group records.
pimd: 02:55:18.470 224.0.0.251 LAN scoped group, skipping.
pimd: 02:55:19.699 Received IGMP v3 Membership Report from 192.168.1.1 to 224.0.0.22
pimd: 02:55:19.699 IGMP v3 report, 40 bytes, from 192.168.1.1 to 224.0.0.22 with 4 group records.
pimd: 02:55:19.699 224.0.0.22 LAN scoped group, skipping.
pimd: 02:55:19.699 224.0.0.2 LAN scoped group, skipping.
pimd: 02:55:19.700 224.0.0.13 LAN scoped group, skipping.
pimd: 02:55:19.700 224.0.0.18 LAN scoped group, skipping.
pimd: 02:55:23.702 k_req_incoming: ask path to 10.10.10.254
pimd: 02:55:23.703 Failed getting route for 10.10.10.254: Network is unreachable
pimd: 02:55:23.703 k_req_incoming: ask path to 10.10.10.254
pimd: 02:55:23.704 Failed getting route for 10.10.10.254: Network is unreachable
pimd: 02:55:23.704 NO ROUTE found for 10.10.10.254
pimd: 02:55:28.706 Sending IGMP v3 query on br-lan.1
pimd: 02:55:28.706 Send IGMP Membership Query from 192.168.1.1 to 224.0.0.1
pimd: 02:55:28.707 SENT 36 bytes IGMP Membership Query from 192.168.1.1 to 224.0.0.1
pimd: 02:55:28.707 Sending IGMP v3 query on gre4-tunnel1
pimd: 02:55:28.708 Send IGMP Membership Query from 51.1.1.2 to 224.0.0.1
pimd: 02:55:28.708 SENT 36 bytes IGMP Membership Query from 51.1.1.2 to 224.0.0.1
pimd: 02:55:28.709 Received IGMP Membership Query from 192.168.1.1 to 224.0.0.1
pimd: 02:55:28.709 Received IGMP Membership Query from 51.1.1.2 to 224.0.0.1
pimd: 02:55:29.140 Received IGMP v3 Membership Report from 192.168.1.1 to 224.0.0.22
pimd: 02:55:29.140 IGMP v3 report, 40 bytes, from 192.168.1.1 to 224.0.0.22 with 4 group records.
pimd: 02:55:29.140 224.0.0.22 LAN scoped group, skipping.
pimd: 02:55:29.141 224.0.0.2 LAN scoped group, skipping.
pimd: 02:55:29.141 224.0.0.13 LAN scoped group, skipping.
pimd: 02:55:29.141 224.0.0.18 LAN scoped group, skipping.
pimd: 02:55:30.181 Received IGMP v3 Membership Report from 192.168.1.112 to 224.0.0.22
pimd: 02:55:30.181 IGMP v3 report, 16 bytes, from 192.168.1.112 to 224.0.0.22 with 1 group records.
pimd: 02:55:30.181 224.0.0.251 LAN scoped group, skipping.
[27107.171391] IPv6: ADDRCONF(NETDEV_CHANGE): wwan0: link becomes ready
pimd: 02:55:34.182 Sending PIM HELLO on br-lan.1
pimd: 02:55:34.183 SENT 46 bytes PIM v2 Hello from 192.168.1.1 to 224.0.0.13
pimd: 02:55:34.183 Sending PIM HELLO on gre4-tunnel1
pimd: 02:55:34.184 SENT 46 bytes PIM v2 Hello from 51.1.1.2 to 224.0.0.13
pimd: 02:55:34.185 RECV 46 bytes PIM v2 Hello from 192.168.1.1 to 224.0.0.13
pimd: 02:55:44.190 Sending IGMP v3 query on br-lan.1
pimd: 02:55:44.190 Send IGMP Membership Query from 192.168.1.1 to 224.0.0.1
pimd: 02:55:44.191 SENT 36 bytes IGMP Membership Query from 192.168.1.1 to 224.0.0.1
pimd: 02:55:44.191 Sending IGMP v3 query on gre4-tunnel1
pimd: 02:55:44.191 Send IGMP Membership Query from 51.1.1.2 to 224.0.0.1
pimd: 02:55:44.191 SENT 36 bytes IGMP Membership Query from 51.1.1.2 to 224.0.0.1
pimd: 02:55:44.191 ------12
pimd: 02:55:44.192 ------12
pimd: 02:55:44.192 k_req_incoming: ask path to 10.10.10.254
pimd: 02:55:44.192 ------26
pimd: 02:55:44.192 k_req_incoming: ask path to 10.10.10.254
pimd: 02:55:44.192 ------26
pimd: 02:55:44.192 NO ROUTE found for 10.10.10.254
ifindex from 24 to 26
Hi, what version of pimd are you using? The latest code on master (still not released) supports reloading interfaces on SIGHUP. So if you can detect the LTE modem coming back you can add an external script to signal pimd.
The version of commit I'm using is 49ECe7F9FE47b39. Ok, I'll try sending a sighup. The way I do it now is to restart the entire PIMD directly through a script
OK, that's a fairly recent version. The sighup is just slightly quicker than a restart. There is no plan at the moment to support interfaces being lost or reappearing (with a new ifindex) at runtime.