Skip to content

Commit

Permalink
fix(ovpnrw): ignore bond management IP
Browse files Browse the repository at this point in the history
Do not set a route for the bond management network
  • Loading branch information
gsanchietti committed Nov 21, 2024
1 parent c5ec0d9 commit 58d5bb6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/nethsec/ovpn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ def get_local_networks(u):
if len(data) > 0:
for addr in data[0].get('addr_info', []):
if addr.get("local", None) and addr.get("family", None) == "inet": # ipv4 only
# skip bond management address
if addr.get("local").startswith("127"):
continue
net = ipaddress.ip_interface(f'{addr.get("local")}/{addr.get("prefixlen")}').network
ret.append(f'{net}')
except:
Expand Down

0 comments on commit 58d5bb6

Please sign in to comment.