summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-09-29 15:39:40 +0200
committerGitHub <noreply@github.com>2023-09-29 15:39:40 +0200
commitb37b0fceb4915fa1e563e34b1e3af1040f461d58 (patch)
tree477a4482800b262334c788f432861e22878c4e53
parent400df973d3518e9f18cb84b52ca89e08a399e461 (diff)
parent42ff4d8a7ba7d01037a1e985cb803cd3355a33f2 (diff)
downloadvyos-1x-b37b0fceb4915fa1e563e34b1e3af1040f461d58.tar.gz
vyos-1x-b37b0fceb4915fa1e563e34b1e3af1040f461d58.zip
Merge pull request #2324 from sarthurdev/fw_configdep
conntrack: T5376: Fix conntrack-sync vyos.configdep issues
-rw-r--r--data/config-mode-dependencies/vyos-1x.json21
-rwxr-xr-xsrc/conf_mode/conntrack.py7
2 files changed, 23 insertions, 5 deletions
diff --git a/data/config-mode-dependencies/vyos-1x.json b/data/config-mode-dependencies/vyos-1x.json
index 72a3d1153..6c86642c7 100644
--- a/data/config-mode-dependencies/vyos-1x.json
+++ b/data/config-mode-dependencies/vyos-1x.json
@@ -1,10 +1,23 @@
{
"conntrack": {"conntrack_sync": ["conntrack_sync"]},
- "firewall": {"conntrack": ["conntrack"], "group_resync": ["conntrack", "nat", "policy-route"]},
+ "firewall": {
+ "conntrack": ["conntrack"],
+ "conntrack_sync": ["conntrack_sync"],
+ "group_resync": ["conntrack", "nat", "policy-route"]
+ },
"http_api": {"https": ["https"]},
- "load_balancing_wan": {"conntrack": ["conntrack"]},
- "nat": {"conntrack": ["conntrack"]},
- "nat66": {"conntrack": ["conntrack"]},
+ "load_balancing_wan": {
+ "conntrack": ["conntrack"],
+ "conntrack_sync": ["conntrack_sync"]
+ },
+ "nat": {
+ "conntrack": ["conntrack"],
+ "conntrack_sync": ["conntrack_sync"]
+ },
+ "nat66": {
+ "conntrack": ["conntrack"],
+ "conntrack_sync": ["conntrack_sync"]
+ },
"pki": {
"ethernet": ["interfaces-ethernet"],
"openvpn": ["interfaces-openvpn"],
diff --git a/src/conf_mode/conntrack.py b/src/conf_mode/conntrack.py
index 2c5fa335e..4cece6921 100755
--- a/src/conf_mode/conntrack.py
+++ b/src/conf_mode/conntrack.py
@@ -212,7 +212,12 @@ def apply(conntrack):
module_str = ' '.join(rm_modules)
cmd(f'rmmod {module_str}')
- call_dependents()
+ try:
+ call_dependents()
+ except ConfigError:
+ # Ignore config errors on dependent due to being called too early. Example:
+ # ConfigError("ConfigError('Interface ethN requires an IP address!')")
+ pass
# We silently ignore all errors
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1264080