Skip to content

T7496 Fix disabling src route #420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- vyos_firewall_global - Fix disabling src route
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ def _render_route_redirects(self, attr, w, h, opr):
afi = None
afi = None
for key, val in iteritems(w):
if val and key != "afi":
if val is not None and key != "afi":
if opr and key in l_set and not (h and self._is_w_same(w, h, key)):
commands.append(
self._form_attr_cmd(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def test_vyos_firewall_global_set_01_merged(self):
),
dict(
afi="ipv6",
ip_src_route=True,
ip_src_route=False,
icmp_redirects=dict(receive=False),
),
],
Expand Down Expand Up @@ -183,6 +183,7 @@ def test_vyos_firewall_global_set_01_merged(self):
"set firewall group port-group TELNET description 'This group has the telnet ports'",
"set firewall group port-group TELNET",
"set firewall ip-src-route 'enable'",
"set firewall ipv6-src-route 'disable'",
"set firewall receive-redirects 'disable'",
"set firewall config-trap 'enable'",
"set firewall ipv6-receive-redirects 'disable'",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def test_vyos_firewall_global_set_01_merged(self):
),
dict(
afi="ipv6",
ip_src_route=True,
ip_src_route=False,
icmp_redirects=dict(receive=False),
),
],
Expand Down Expand Up @@ -185,6 +185,7 @@ def test_vyos_firewall_global_set_01_merged(self):
"set firewall global-options ip-src-route 'enable'",
"set firewall global-options receive-redirects 'disable'",
"set firewall global-options config-trap 'enable'",
"set firewall global-options ipv6-src-route 'disable'",
"set firewall global-options ipv6-receive-redirects 'disable'",
"set firewall global-options state-policy established action 'accept'",
"set firewall global-options state-policy established log",
Expand Down