mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-20 03:11:46 +00:00
71ef7236ca
In veth/macvlan modes the gateway LRP carries all egress, so it must hold a WAN-subnet IP — otherwise the upstream router silently drops ARP for the WAN nexthop (RFC 826) and the default route never resolves. The hardcoded 169.254.0.1/30 was correct for distributed NAT but regressed centralized NAT (introduced under mulga-siv-26). Add gw_lrp_range_start/end to ExternalPool. In centralized mode at IGW attach the gateway LRP gets a fresh IP from that range, persisted as external_ids:spinifex:gateway_ip on the LRP for idempotent reconcile and retrofit. Direct mode keeps link-local. Per-VM EIP allocator skips the gw range; ValidatePoolConfig rejects overlap with the EIP range. Adds TestTopologyHandler_IGWAttach_CentralizedNATAllocatesGwLrpIP and extends RetrofitAllGatewayPortNetworks to migrate stale link-local LRPs to allocated pool IPs at startup.