Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: iptables: Devel

[PATCH] Makefile for man pages of xtables extensions

 

 

iptables devel RSS feed   Index | Next | Previous | View Threaded


panther at balabit

Sep 3, 2007, 5:48 AM

Post #1 of 4 (852 views)
Permalink
[PATCH] Makefile for man pages of xtables extensions

Hello,

I made this patch to include all available matches and targets to
iptables.8 and ip6tables.8 man pages. The source file is lixt_*.c but
the man page is libipt_*.man or libip6t.man as expected.

If there are additional matches and targets (extra, as in POM), the
variable named "extra" is used which was unescaped.

But I found that in the generated man pages of the svn version of
modules the title is
... (not supported, see Patch-O-Matic)
for instance helper, length, limit etc. Is it intended?


Regards,
Laszlo Attila Toth
Attachments: iptables-make.diff (2.85 KB)


kaber at trash

Sep 5, 2007, 6:45 AM

Post #2 of 4 (810 views)
Permalink
Re: [PATCH] Makefile for man pages of xtables extensions [In reply to]

Laszlo Attila Toth wrote:
> Hello,
>
> I made this patch to include all available matches and targets to
> iptables.8 and ip6tables.8 man pages. The source file is lixt_*.c but
> the man page is libipt_*.man or libip6t.man as expected.


Thanks for taking care of this. Mid term we should probably also
move to a single source file for the xtables manpages, they *should*
be identical anyways.

> But I found that in the generated man pages of the svn version of
> modules the title is
> ... (not supported, see Patch-O-Matic)
> for instance helper, length, limit etc. Is it intended?


No, matches and targets available in the kernel should not be
marked as not supported. Care to send another patch to fix this?

> --- iptables.orig/extensions/Makefile 2007-08-07 10:03:05.000000000 +0200
> +++ iptables/extensions/Makefile 2007-09-03 14:28:44.000000000 +0200
> @@ -29,6 +29,11 @@
> PF6_EXT_MAN_ALL_MATCHES:=$(foreach T,$(PF6_EXT_ALL_SLIB),$(shell test -f extensions/libip6t_$(T).man && grep -q register_match6 extensions/libip6t_$(T).c && echo $(T)))
> PF6_EXT_MAN_ALL_TARGETS:=$(foreach T,$(PF6_EXT_ALL_SLIB),$(shell test -f extensions/libip6t_$(T).man && grep -q register_target6 extensions/libip6t_$(T).c && echo $(T)))
>
> +PF_EXT_MAN_ALL_MATCHES+=$(foreach T,$(PFX_EXT_ALL_SLIB),$(shell test -f extensions/libipt_$(T).man && grep -q register_match extensions/libxt_$(T).c && echo $(T)))
> +PF_EXT_MAN_ALL_TARGETS+=$(foreach T,$(PFX_EXT_ALL_SLIB),$(shell test -f extensions/libipt_$(T).man && grep -q register_target extensions/libxt_$(T).c && echo $(T)))
> +PF6_EXT_MAN_ALL_MATCHES+=$(foreach T,$(PFX_EXT_ALL_SLIB),$(shell test -f extensions/libip6t_$(T).man && grep -q register_match6 extensions/libxt_$(T).c && echo $(T)))
> +PF6_EXT_MAN_ALL_TARGETS+=$(foreach T,$(PFX_EXT_ALL_SLIB),$(shell test -f extensions/libip6t_$(T).man && grep -q register_target6 extensions/libxt_$(T).c && echo $(T)))


This doesn't work for IPv6 extensions. We use xtables_register_match
for both IPv4 and IPv6. I've changed this in your patch and applied it.
Thanks again.


panther at balabit

Sep 5, 2007, 8:58 AM

Post #3 of 4 (794 views)
Permalink
Re: [PATCH] Makefile for man pages of xtables extensions + connrate [In reply to]

Patrick McHardy írta:
> Laszlo Attila Toth wrote:
>> But I found that in the generated man pages of the svn version of
>> modules the title is
>> ... (not supported, see Patch-O-Matic)
>> for instance helper, length, limit etc. Is it intended?
>
>
> No, matches and targets available in the kernel should not be
> marked as not supported. Care to send another patch to fix this?
>

I made a new patch for connrate: it was not optional (not tested) and
wasn't in the Makefile's PF_EXT_SLIB: line. It is not in the kernel
version 2.6.23-rc3 (linus.git)


I made the following changes in extensions/Makefile:

* no extra target/match by default :)
* man page of fix modules (PF_EXT_SLIB etc.) plus optional
(...SLIB_OPTS) modules generated, but not all.
* because of the previous one I had to rename PF_EXT_SE_SLIB to
PF_EXT_SELINUX_SLIB etc. as a non-optional variable, original
PF_EXT_SE_SLIB gets the value of PF_EXT_SELINUX_SLIB if DO_SELINUX is
set to 1.

Regards,
Attila
Attachments: iptables-connrate-test.diff (0.23 KB)
  iptables-make2.diff (4.91 KB)


kaber at trash

Sep 6, 2007, 2:56 AM

Post #4 of 4 (798 views)
Permalink
Re: [PATCH] Makefile for man pages of xtables extensions + connrate [In reply to]

Laszlo Attila Toth wrote:
> I made a new patch for connrate: it was not optional (not tested) and
> wasn't in the Makefile's PF_EXT_SLIB: line. It is not in the kernel
> version 2.6.23-rc3 (linus.git)


I missed connrate when removing the other unsupported extensions,
I removed it now.

> I made the following changes in extensions/Makefile:
>
> * no extra target/match by default :)
> * man page of fix modules (PF_EXT_SLIB etc.) plus optional
> (...SLIB_OPTS) modules generated, but not all.
> * because of the previous one I had to rename PF_EXT_SE_SLIB to
> PF_EXT_SELINUX_SLIB etc. as a non-optional variable, original
> PF_EXT_SE_SLIB gets the value of PF_EXT_SELINUX_SLIB if DO_SELINUX is
> set to 1.


Applied, thanks Attila.

iptables devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.