From 58d5bb6421742a11820a3508d8630fe02156a7b3 Mon Sep 17 00:00:00 2001 From: Giacomo Sanchietti Date: Thu, 21 Nov 2024 14:51:43 +0100 Subject: [PATCH] fix(ovpnrw): ignore bond management IP Do not set a route for the bond management network --- src/nethsec/ovpn/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/nethsec/ovpn/__init__.py b/src/nethsec/ovpn/__init__.py index 781e871b..fa756a53 100644 --- a/src/nethsec/ovpn/__init__.py +++ b/src/nethsec/ovpn/__init__.py @@ -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: