Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
bskjon committed Nov 12, 2023
1 parent 35d2993 commit cbf1a08
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DynamicRoutingUpdater/NetworkAdapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ def getGateway(self) -> Optional[str]:
except:
logging.error(f"getGateway => {gw}")
# If this is hit, then it could not find the gateway using traditional means
logging.info("Using fallback to get gateway")
netst = self.parseNetstat(nic_name=self.name)
routable = [line for line in netst if line.flags.lower() == "G".lower()]
routable = [line for line in netst if "G".lower() in line.flags.lower()]
use_route: Netstated = next(iter(routable), None)
if (use_route is not None):
return use_route.gateway
Expand Down

0 comments on commit cbf1a08

Please sign in to comment.