diff --git a/dumbno.py b/dumbno.py index 76c8c7e..aad05a2 100644 --- a/dumbno.py +++ b/dumbno.py @@ -32,8 +32,7 @@ def make_rule_fragment(protocol, host, port): #ip based ACL, no ports if protocol.startswith("ip"): return a - port_wildcard = "any" if host else "" - ap = ("eq %s" % port) if port else port_wildcard + ap = ("eq %s" % port) if port else "" return a + " " + ap diff --git a/setup.py b/setup.py index 5c8f68d..cc126b3 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup setup(name='dumbno', - version='0.8.1', + version='0.8.2', zip_safe=True, py_modules = ["dumbno"], install_requires=[ diff --git a/tests.py b/tests.py index c00ea42..3306529 100644 --- a/tests.py +++ b/tests.py @@ -13,7 +13,7 @@ def test_make_rule(): dict(s="1.2.3.4", d="5.6.7.8")), ('tcp host 1.2.3.4 eq 123 host 5.6.7.8 eq 567', dict(s="1.2.3.4", d="5.6.7.8", sp=123, dp=567, proto='tcp')), - ('tcp host 1.2.3.4 any host 5.6.7.8 eq 567', + ('tcp host 1.2.3.4 host 5.6.7.8 eq 567', dict(s="1.2.3.4", d="5.6.7.8", dp=567, proto='tcp')), ('tcp any host 5.6.7.8 eq 567', dict(d="5.6.7.8", dp=567, proto='tcp')),