Skip to content

Commit

Permalink
Adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
bskjon committed Nov 12, 2023
1 parent ee70b61 commit 35d2993
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions DynamicRoutingUpdater/NetworkAdapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,13 @@ def getGateway(self) -> Optional[str]:
for gw in gws:
try:
gwstr: str = str(gw)
if 'default' in gwstr:
continue
entries = gws[gw]
for entry in entries:
if self.name in entry[1]:
return entry[0]
if 'default' not in gwstr:
entries = gws[gw]
for entry in entries:
if self.name in entry[1]:
return entry[0]
except:
logging.error(f"getGateway => {gw}")
pass
# If this is hit, then it could not find the gateway using traditional means
netst = self.parseNetstat(nic_name=self.name)
routable = [line for line in netst if line.flags.lower() == "G".lower()]
Expand Down

0 comments on commit 35d2993

Please sign in to comment.