jaysoffian / eap_proxy

Proxy EAP packets between interfaces on Linux devices such as the Ubiquiti Networks EdgeRouter™ and UniFi® Security Gateway.
BSD 3-Clause "New" or "Revised" License
562 stars 87 forks source link

Regex for default gateway can fail with complex route tables #10

Closed keatontaylor closed 5 years ago

keatontaylor commented 5 years ago

This is a bug where the regex used to lookup the default gateway and ping it can fail to lookup then right next-hop default address when the route table includes other routes of different masks for the default or 0.0.0.0/0 route.

This was discovered when a default route to 0.0.0.0/0 is added to route all ER traffic over a VPN tunnel. The route then discovered by eap_proxy will give an address of 0.0.0.0 to attempt to ping and a result will fail the ping test and restart the tunnel.

Proposed solutions: