Skip to contentSkip to conversation

New manpage for libipt_recent

DISCUSSION Enrique Perez-Terron 1 participant 1 message Jul 14, 2005 netfilter

lore
Share & tools
lore
#0 lore raw

The file trunk / iptables / extensions / libipt_recent.man says you can prefix inversion bangs to the options --seconds and --hit-count, but the code in trunk / iptables / extensions / libipt_recent.c says

    case 204:
        info->seconds = atoi(optarg);
        break;

    case 205:
        info->hit_count = atoi(optarg);
        break;

i.e, there is no call to check_inverse() like there is for the options --rcheck, --update, --set, and --remove, like this:

        check_inverse(optarg, &invert, &optind, 0);
        info->check_set |= IPT_RECENT_REMOVE;
        if (invert) info->invert = 1;

I also think the manual page could be clearer with respect to what is negated.
Reading the code it appears that the list of ip addresses is changed or not in exactly the same way with or without the bang. Only the return status is negated. I believe that affects how netfilter continues through its tables, taking the jump indicated in the rule, or not.

One exception though; "! --set" (whenever that may make sense) appears to reliably do nothing and return false. I think the bang here could just as well be un-documented.

I have written a new manpage, extending the current one quite much.
The current man-page looks like it is intended to be embedded in something, but I do not know what that is. I am therefore afraid that Somebody :) will have to edit it further to fit whatever framework it needs to fit.

Could you please look through it and tell me about any errors and misunderstandings? I have not read the code _that_ extensively.

For your convenience I have attached both the diff -u and the resulting .man

Regards,
Enrique Perez-Terron