ldx / python-iptables

Python bindings for iptables
731 stars 183 forks source link

SIGABRT in create_chain if name length greater or equal to 30 #252

Closed konrad-fil closed 5 years ago

konrad-fil commented 6 years ago

To reproduce:

import iptc
chain = iptc.Table('mangle').create_chain('mcastapp:PREROUTING:block_group')

if name is 29-30 characters long SIGABRT will be raised if name is longer IPTCError will be thrown with message: "can't create chain mcastapp:PREROUTING:block_group123456789: Invalid argument"

jllorente commented 5 years ago

@konrad-fil , I don't think this is related to the library itself. The length of the iptable components, say chains, targets or matches, seems to be defined in the kernel. See here