Bypass route creation fails on a table that does not exist yet #63
Loading…
Reference in a new issue
No description provided.
Delete branch "mysticalsoap/fix/bypass-route-replace"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
#61's rule dedup landed, and live retest showed exactly one fwmark rule -- but table 11 still didn't exist and bypassed traffic still left through the tunnel. The remaining blocker sat one line further down:
create_cgrouprunsip route flush table 11before the route add, and modern iproute2 errors out flushing a table that does not exist yet ("FIB table does not exist") -- which is every first bypass setup after boot. TheCalledProcessErroraborts the block, the route add never runs, and the table is never created. Same modern-iproute2 breakage class as the duplicate-rule refusal, previously masked by it.Fix
ip route replaceinstead of flush-and-add, both families. The table only ever holds this single default route (the OpenVPN bypass scripts also just rewritedefault), so replace subsumes the flush: it overwrites a stale route regardless of what it pointed at and creates the table when absent, on old and new iproute2 alike.scripts/bypass_up.sh's del-and-add pair gets the same treatment -- itsdelerrors the same way on a route that is not there.Verification
ip route show table 11shows the physical default route, andcurl icanhazip.comfrom a shell joined to the bypass cgroup prints the home IP while an unbypassed shell prints the VPN exit -- first end-to-end working bypass on this hostRelated fixes: third round of #58's live-test fallout, after #61.
Assisted-by: claude-fable-5