From 21ef365c59dfff0fa460d60514560a7d10dcf0a0 Mon Sep 17 00:00:00 2001 From: Anthony Cornehl Date: Tue, 10 Sep 2019 14:05:28 -0700 Subject: [PATCH] The size of pf_rule grew in OpenBSD 6.4 --- sshuttle/methods/pf.py | 2 +- tests/client/test_methods_pf.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sshuttle/methods/pf.py b/sshuttle/methods/pf.py index 32987ed..e73542d 100644 --- a/sshuttle/methods/pf.py +++ b/sshuttle/methods/pf.py @@ -262,7 +262,7 @@ class OpenBsd(Generic): ("proto_variant", c_uint8), ("direction", c_uint8)] - self.pfioc_rule = c_char * 3416 + self.pfioc_rule = c_char * 3424 self.pfioc_natlook = pfioc_natlook super(OpenBsd, self).__init__() diff --git a/tests/client/test_methods_pf.py b/tests/client/test_methods_pf.py index 36803ac..42f1828 100644 --- a/tests/client/test_methods_pf.py +++ b/tests/client/test_methods_pf.py @@ -403,8 +403,8 @@ def test_setup_firewall_openbsd(mock_pf_get_dev, mock_ioctl, mock_pfctl): None) assert mock_ioctl.mock_calls == [ - call(mock_pf_get_dev(), 0xcd58441a, ANY), - call(mock_pf_get_dev(), 0xcd58441a, ANY), + call(mock_pf_get_dev(), 0xcd60441a, ANY), + call(mock_pf_get_dev(), 0xcd60441a, ANY), ] assert mock_pfctl.mock_calls == [ call('-s Interfaces -i lo -v'), @@ -451,8 +451,8 @@ def test_setup_firewall_openbsd(mock_pf_get_dev, mock_ioctl, mock_pfctl): False, None) assert mock_ioctl.mock_calls == [ - call(mock_pf_get_dev(), 0xcd58441a, ANY), - call(mock_pf_get_dev(), 0xcd58441a, ANY), + call(mock_pf_get_dev(), 0xcd60441a, ANY), + call(mock_pf_get_dev(), 0xcd60441a, ANY), ] assert mock_pfctl.mock_calls == [ call('-s Interfaces -i lo -v'),