Skip to content

Commit 282c790

Browse files
committed
Don't set xtables_{matches,targets} to NULL.
Protocol-independent extensions will be looked up once for each protocol and added to the protocol-specific cache. Fixes #282.
1 parent 7fe9a99 commit 282c790

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

iptc/xtables.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,10 +1020,6 @@ def find_match(self, name):
10201020
if ext is not None:
10211021
return ext
10221022

1023-
xtables._xtables_matches.value = ct.c_void_p(None).value
1024-
if xtables._xtables_pending_matches:
1025-
xtables._xtables_pending_matches.value = ct.c_void_p(None).value
1026-
10271023
match = xtables._xtables_find_match(name, XTF_TRY_LOAD, None)
10281024
if not match:
10291025
self._try_register(name)
@@ -1045,10 +1041,6 @@ def find_target(self, name):
10451041
if ext is not None:
10461042
return ext
10471043

1048-
xtables._xtables_targets.value = ct.c_void_p(None).value
1049-
if xtables._xtables_pending_targets:
1050-
xtables._xtables_pending_targets.value = ct.c_void_p(None).value
1051-
10521044
target = xtables._xtables_find_target(name, XTF_TRY_LOAD)
10531045
if not target:
10541046
self._try_register(name)

0 commit comments

Comments
 (0)