remove_backup_route: route repoint is one-way and gated on $changed #6

Closed
opened 2026-10-18 17:14:41 -07:00 by eric · 0 comments
Owner

Severity: Medium (only when $remove_backup_route = true) · Location: 10-wancarp:444-452, MASTER branch 375-405

  • No restore on MASTER. The MASTER branch never undoes the default-route repoint to $lan_vip. It relies on interface_configure → newwanip to rewrite the default route. That probably works with DHCP, but I couldn't confirm it for a static WAN. If it doesn't happen, the new MASTER sends its default traffic to the peer, which is now the BACKUP with its WAN down.
  • Repoint skipped when WAN was already down. The repoint only runs when $changed is true. If WAN was already down (for example it failed to come up at boot), the BACKUP keeps a stale or missing default route.
  • Errors are ignored. If route delete default fails, its error is logged and route add runs anyway.

Suggested fix:

  • Explicitly restore the default route (or trigger routing reconfigure) on MASTER when $remove_backup_route is set.
  • Decide the repoint based on the current default route, not on $changed.
  • Check run_cmd() results.
**Severity:** Medium (only when `$remove_backup_route = true`) · **Location:** `10-wancarp:444-452`, MASTER branch `375-405` - **No restore on MASTER.** The MASTER branch never undoes the default-route repoint to `$lan_vip`. It relies on `interface_configure` → newwanip to rewrite the default route. That probably works with DHCP, but I couldn't confirm it for a static WAN. If it doesn't happen, the new MASTER sends its default traffic to the peer, which is now the BACKUP with its WAN down. - **Repoint skipped when WAN was already down.** The repoint only runs when `$changed` is true. If WAN was already down (for example it failed to come up at boot), the BACKUP keeps a stale or missing default route. - **Errors are ignored.** If `route delete default` fails, its error is logged and `route add` runs anyway. **Suggested fix:** - Explicitly restore the default route (or trigger routing reconfigure) on MASTER when `$remove_backup_route` is set. - Decide the repoint based on the current default route, not on `$changed`. - Check `run_cmd()` results.
eric closed this issue 2026-10-20 09:01:33 -07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
eric/10-wancarp#6
No description provided.