Skip to contentSkip to conversation

netfilter: Rename ipt_ECN.h to ipt_ecn_target.h (and similar) to avoid file name clash

RFC Pēteris Kļaviņš 4 participants 10 messages Aug 16, 2008 – Aug 18, 2008 netfilter

lore
Share & tools
lore
#0 lore raw

This is a request for comments on the proposal that the following filename changes (indicative at this point) be made in the netfilter source code tree, together with correcting the corresponding references to the files in both source code, the build system, and wherever else necessary.

The changes are proposed in order to avoid file name clashes on filesystems that do not allow two files to have names that differ only in the case of their letters:

include/linux/netfilter/xt_CONNMARK.h => xt_connmark_target.h include/linux/netfilter/xt_DSCP.h => xt_dscp_target.h include/linux/netfilter/xt_MARK.h => xt_mark_target.h include/linux/netfilter/xt_RATEEST.h => xt_rateest_target.h include/linux/netfilter/xt_TCPMSS.h => xt_tcpmss_target.h include/linux/netfilter_ipv4/ipt_CONNMARK.h => ipt_connmark_target.h include/linux/netfilter_ipv4/ipt_DSCP.h => ipt_dscp_target.h include/linux/netfilter_ipv4/ipt_ECN.h => ipt_ecn_target.h include/linux/netfilter_ipv4/ipt_MARK.h => ipt_mark_target.h include/linux/netfilter_ipv4/ipt_TCPMSS.h => ipt_tcpmss_target.h include/linux/netfilter_ipv4/ipt_TOS.h => ipt_tos_target.h include/linux/netfilter_ipv4/ipt_TTL.h => ipt_ttl_target.h include/linux/netfilter_ipv6/ip6t_HL.h => ip6t_hl_target.h include/linux/netfilter_ipv6/ip6t_MARK.h => ip6t_mark_target.h net/ipv4/netfilter/ipt_ECN.c => ipt_ecn_target.c net/ipv4/netfilter/ipt_TTL.c => ipt_ttl_target.c net/ipv6/netfilter/ip6t_HL.c => ip6t_hl_target.c net/netfilter/xt_CONNMARK.c => xt_connmark_target.c net/netfilter/xt_DSCP.c => xt_dscp_target.c net/netfilter/xt_MARK.c => xt_mark_target.c net/netfilter/xt_RATEEST.c => xt_rateest_target.c net/netfilter/xt_TCPMSS.c => xt_tcpmss_target.c

This has been discussed before on the git mailing list (see thread http://article.gmane.org/gmane.comp.version-control.git/38612 ), and I believe it to be a problem that will start to crop up more often than not, given the proliferation of open source code onto a variety of platforms that have this type of filename intolerance.

The reason for posting to this list is to hear your considered opinion on the impact of these proposed file name changes on the netfilter and linux kernel development communities. If you prefer I submit complete patches before discussion, I could try to do that.

Signature · 1 line
 Peter Klavins
#1 lore raw
Quoted 11 lines · Pēteris Kļaviņš

This is a request for comments on the proposal that the following filename changes (indicative at this point) be made in the netfilter source code tree, together with correcting the corresponding references to the files in both source code, the build system, and wherever else necessary.

The changes are proposed in order to avoid file name clashes on filesystems that do not allow two files to have names that differ only in the case of their letters:

include/linux/netfilter/xt_CONNMARK.h => xt_connmark_target.h

[...]

As I see it, this will already be addressed by merging complementary code into one source file (e.g. MARK, mark, CONNMARK, connmark all into a big new xt_mark.c), to reduce (a) amount of files and (b) build time.

This has been touched before at
http://marc.info/?l=netfilter-devel&m=121148631320895&w=2
I welcome that idea, but have yet been holding off sending patches on that because these code-moving changes would possibly generate a lot of .rej noise while I am still having other patches in my queue.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 8 lines · Jan Engelhardt
Quoted 1 line

include/linux/netfilter/xt_CONNMARK.h => xt_connmark_target.h

[...]

As I see it, this will already be addressed by merging complementary code into one source file (e.g. MARK, mark, CONNMARK, connmark all into a big new xt_mark.c), to reduce (a) amount of files and (b) build time.

Quoted 6 lines

This has been touched before at
http://marc.info/?l=netfilter-devel&m=121148631320895&w=2
I welcome that idea, but have yet been holding off sending patches on that because these code-moving changes would possibly generate a lot of .rej noise while I am still having other patches in my queue.

Thanks very much for the heads-up on the pending code simplification, of course it makes sense to rename files as part of that work.

I'll clone git://git.netfilter.org/iptables.git regularly, watching for the file name clashes to go away, and I'll only nag on this list if I think that it's been forgotten, I hope that's OK.

Signature · 1 line
 Peter Klavins
#3 lore raw
In reply to Jan Engelhardt
Quoted 12 lines · Jan Engelhardt
Quoted 10 lines · P˙˙teris K˙˙avi˙˙š

This is a request for comments on the proposal that the following filename changes (indicative at this point) be made in the netfilter source code tree, together with correcting the corresponding references to the files in both source code, the build system, and wherever else necessary.

The changes are proposed in order to avoid file name clashes on filesystems that do not allow two files to have names that differ only in the case of their letters:

Quoted 7 lines
Quoted 1 line

include/linux/netfilter/xt_CONNMARK.h => xt_connmark_target.h

[...]

As I see it, this will already be addressed by merging complementary code into one source file (e.g. MARK, mark, CONNMARK, connmark all into a big new xt_mark.c), to reduce (a) amount of files and (b) build time.

[...]

That is half of the story: we encode the functionality (match/target) in the case of the (file)name and there are targets which have got no match counterpart and thus no natural lowercase filename to merge into it. So the directory tree still will be broken on case-insensitive filesystems.

If as a side effect of some real internal changes netfilter becomes compatible with case-insensitive filesystems, that's fine. However, I object changes just for the sake to be compatible with such horrid filesystems.

Best regards,
Jozsef
the NACK guy of the week
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics

          H-1525 Budapest 114, POB. 49, Hungary
#4 lore raw
Quoted 14 lines · Jozsef Kadlecsik
Quoted 6 lines · Jan Engelhardt
Quoted 4 lines · P˙˙teris K˙˙avi˙˙š

The changes are proposed in order to avoid file name clashes on filesystems that do not allow two files to have names that differ only in the case of their letters:

Quoted 7 lines
Quoted 1 line

include/linux/netfilter/xt_CONNMARK.h => xt_connmark_target.h

[...]

As I see it, this will already be addressed by merging complementary code into one source file (e.g. MARK, mark, CONNMARK, connmark all into a big new xt_mark.c), to reduce (a) amount of files and (b) build time.

Quoted 6 lines

[...]

That is half of the story: we encode the functionality (match/target) in the case of the (file)name and there are targets which have got no match counterpart and thus no natural lowercase filename to merge into it. So the directory tree still will be broken on case-insensitive filesystems.

We have not decided on filenames yet, just that matches/targets that are commonly used together should go into a single file for the two above-mentioned reasons, and lower-casing does not appear in (a) or (b). --
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw
Quoted 17 lines · Jan Engelhardt
Quoted 16 lines · Jozsef Kadlecsik
Quoted 13 lines · Jan Engelhardt
Quoted 5 lines · P˙˙teris K˙˙avi˙˙š

The changes are proposed in order to avoid file name clashes on filesystems that do not allow two files to have names that differ only in the case of their letters:

include/linux/netfilter/xt_CONNMARK.h => xt_connmark_target.h

[...]

As I see it, this will already be addressed by merging complementary code into one source file (e.g. MARK, mark, CONNMARK, connmark all into a big new xt_mark.c), to reduce (a) amount of files and (b) build time.

[...]

Quoted 8 lines
Quoted 4 lines

That is half of the story: we encode the functionality (match/target) in the case of the (file)name and there are targets which have got no match counterpart and thus no natural lowercase filename to merge into it. So the directory tree still will be broken on case-insensitive filesystems.

We have not decided on filenames yet, just that matches/targets that are commonly used together should go into a single file for the two above-mentioned reasons, and lower-casing does not appear in (a) or (b).

You wrote: "by merging into ... a big new xt_mark.c". Pteris also suggested fully lowercased names, e.g. xt_connmark_target.h. Or are you just pulling my leg by pointing to the possibility to >capitalize< all the filenames in netfilter, to achieve case-insensitive filenames?

But of course I'm writing about (c):

libipt_SNAT|DNAT|MASQUERADE|REDIRECT|SAME|NETMAP.c libipt_LOG.c, libxt_NFLOG.c,
...

And you are fully aware that the same case-sensitivity applies to the source of iptables as well.

Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics

          H-1525 Budapest 114, POB. 49, Hungary
#6 lore raw
Quoted 17 lines · Jozsef Kadlecsik
Quoted 15 lines · Jan Engelhardt
Quoted 14 lines · Jozsef Kadlecsik
Quoted 13 lines · Jan Engelhardt
Quoted 5 lines · P˙˙teris K˙˙avi˙˙š

The changes are proposed in order to avoid file name clashes on filesystems that do not allow two files to have names that differ only in the case of their letters:

include/linux/netfilter/xt_CONNMARK.h => xt_connmark_target.h

[...]

As I see it, this will already be addressed by merging complementary code into one source file (e.g. MARK, mark, CONNMARK, connmark all into a big new xt_mark.c), to reduce (a) amount of files and (b) build time.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

[...]

That is half of the story: we encode the functionality (match/target) in the case of the (file)name and there are targets which have got no match counterpart and thus no natural lowercase filename to merge into it. So the directory tree still will be broken on case-insensitive filesystems.

We have not decided on filenames yet, just that matches/targets that are commonly used together should go into a single file for the two above-mentioned reasons, and lower-casing does not appear in (a) or (b).

You wrote: "by merging into ... a big new xt_mark.c". Pteris also suggested fully lowercased names, e.g. xt_connmark_target.h. Or are you just pulling my leg by pointing to the possibility to >capitalize< all the filenames in netfilter, to achieve case-insensitive filenames?

My suggested names were taken from within the files themselves. Note that the standard #ifdef multiple inclusion guards in the existing files could not follow normal practice and had to be modified in some way, because by tradition they are simply uppercase transformations of the filename itself (but that would end up in a clash!), and so the xt_CONNMARK.h include guard is "_XT_CONNMARK_H_target". By natural extension, my proposal was to rename the existing uppercase file to xt_connmark_target.h. However, for the typical case-insensitive filesystems out there, it is fine for the file to be called xt_CONNMARK_target.h, and I have no objection to that, so long as that doesn't clash with another filename differing only in the case of the letters:

$ ls | grep -i xt_connmark | while read i; do grep _H $i /dev/null; done
xt_CONNMARK.h:#ifndef _XT_CONNMARK_H_target
xt_CONNMARK.h:#define _XT_CONNMARK_H_target
xt_CONNMARK.h:#endif /*_XT_CONNMARK_H_target*/
xt_connmark.h:#ifndef _XT_CONNMARK_H
xt_connmark.h:#define _XT_CONNMARK_H
xt_connmark.h:#endif /*_XT_CONNMARK_H*/
Signature · 6 lines
 Peter Klavins

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#7 lore raw
Quoted 33 lines · Pteris Kaviš
Quoted 23 lines · Jozsef Kadlecsik
Quoted 21 lines · Jan Engelhardt
Quoted 20 lines · Jozsef Kadlecsik
Quoted 6 lines · Jan Engelhardt
Quoted 4 lines · Pteris Kaviš

The changes are proposed in order to avoid file name clashes on filesystems that do not allow two files to have names that differ only in the case of their letters:

Quoted 7 lines
Quoted 1 line

include/linux/netfilter/xt_CONNMARK.h => xt_connmark_target.h

[...]

As I see it, this will already be addressed by merging complementary code into one source file (e.g. MARK, mark, CONNMARK, connmark all into a big new xt_mark.c), to reduce (a) amount of files and (b) build time.

[...]

That is half of the story: we encode the functionality (match/target) in the case of the (file)name and there are targets which have got no match counterpart and thus no natural lowercase filename to merge into it. So the directory tree still will be broken on case-insensitive filesystems.

Quoted 8 lines
Quoted 3 lines

We have not decided on filenames yet, just that matches/targets that are commonly used together should go into a single file for the two above-mentioned reasons, and lower-casing does not appear in (a) or (b).

You wrote: "by merging into ... a big new xt_mark.c". Pteris also suggested fully lowercased names, e.g. xt_connmark_target.h. Or are you just pulling my leg by pointing to the possibility to >capitalize< all the filenames in netfilter, to achieve case-insensitive filenames?

Quoted 12 lines

My suggested names were taken from within the files themselves. Note that the standard #ifdef multiple inclusion guards in the existing files could not follow normal practice and had to be modified in some way, because by tradition they are simply uppercase transformations of the filename itself (but that would end up in a clash!), and so the xt_CONNMARK.h include guard is "_XT_CONNMARK_H_target". By natural extension, my proposal was to rename the existing uppercase file to xt_connmark_target.h. However, for the typical case-insensitive filesystems out there, it is fine for the file to be called xt_CONNMARK_target.h, and I have no objection to that, so long as that doesn't clash with another filename differing only in the case of the letters:

[...]

I should have looked up the old thread at the first place:
http://marc.info/?l=netfilter-devel&m=109795874701112&w=2

Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics

          H-1525 Budapest 114, POB. 49, Hungary
#9 lore raw
In reply to Jozsef Kadlecsik
Quoted 21 lines · Jozsef Kadlecsik
Quoted 12 lines · Jan Engelhardt
Quoted 10 lines · P˙˙teris K˙˙avi˙˙š

This is a request for comments on the proposal that the following filename changes (indicative at this point) be made in the netfilter source code tree, together with correcting the corresponding references to the files in both source code, the build system, and wherever else necessary.

The changes are proposed in order to avoid file name clashes on filesystems that do not allow two files to have names that differ only in the case of their letters:

Quoted 7 lines
Quoted 1 line

include/linux/netfilter/xt_CONNMARK.h => xt_connmark_target.h

[...]

As I see it, this will already be addressed by merging complementary code into one source file (e.g. MARK, mark, CONNMARK, connmark all into a big new xt_mark.c), to reduce (a) amount of files and (b) build time.

Quoted 5 lines

[...]

That is half of the story: we encode the functionality (match/target) in the case of the (file)name and there are targets which have got no match counterpart and thus no natural lowercase filename to merge into it. So the directory tree still will be broken on case-insensitive filesystems.

If as a side effect of some real internal changes netfilter becomes compatible with case-insensitive filesystems, that's fine. However, I object changes just for the sake to be compatible with such horrid filesystems.

I agree. Without compat files this would also break compilation of old userspace, so this is not an option anyways.

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html