2ab5a39a57
Mirrored mode re-clones the Windows NIC's addresses each boot, so the kernel keeps picking the wrong source for stacked device subnets (10.0.10.x sourced from 192.168.1.123) — ARP resolves but ping/TCP dies, and every runtime ip-route fix is wiped by wsl --shutdown. deploy/wsl-fix-route-source.sh pins each scope-link route's src to this host's own address in that subnet (no hardcoded IPs, idempotent, preserves metric, non-fatal per route, waits for the route at boot). deploy/parking-net .service reapplies it on every boot. Dev-box only; the appliance is bare-metal Linux with static networkd config. Verified: camera pings with no -I flag; driver pulls a snapshot with no localAddress set.
17 lines
651 B
Desktop File
17 lines
651 B
Desktop File
[Unit]
|
|
Description=Parking dev: pin route source addresses (WSL2 mirrored-mode fix)
|
|
# Run after WSL has populated the mirrored interfaces/addresses.
|
|
After=network.target wsl-pro.service
|
|
Wants=network.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
# Idempotent; safe to re-run. Path is the repo checkout on this dev box.
|
|
ExecStart=/home/julian/projects/JS/parking-system/deploy/wsl-fix-route-source.sh eth1
|
|
# Mirrored-mode addresses can land slightly after boot; one retry covers the race.
|
|
ExecStartPost=/bin/sh -c 'sleep 3; /home/julian/projects/JS/parking-system/deploy/wsl-fix-route-source.sh eth1 || true'
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|