Rebased onto xtables v2.5