Skip to contentSkip to conversation

Increasing XT_EXTENSION_MAXNAMELEN to 32

PATCH Cong Wang 3 participants 4 messages Sep 29, 2012 – Oct 2, 2012 netfilter

lore
Share & tools
lore

Cong Wang

author
#0 lore raw

Hi, netfilter experts,

A customer wants to increase XT_EXTENSION_MAXNAMELEN to at least 31 (1 for '\0'), so I just increase it to 32. Do you have any comments or objections for the following patch?

The vmlinux size increases by 768 bytes with my allyesconfig:

% size vmlinux
text data bss dec hex filename
15158877 3942208 11812864 30913949 1d7b59d vmlinux
% size vmlinux.AFTER
text data bss dec hex filename
15158877 3942976 11812864 30914717 1d7b89d vmlinux.AFTER

I know probably the user-space part needs to update too, here is just the kernel part patch for you to review. And I only did compile test.

Thanks!

---

(quoted diff) +0 -0

b/include/linux/netfilter/x_tables.h
index 8d674a7..24b4dd4 100644

include/linux/netfilter/x_tables.h +1 -1
@@ -4,7 +4,7 @@
 #include <linux/types.h>
 
 #define XT_FUNCTION_MAXNAMELEN 30
-#define XT_EXTENSION_MAXNAMELEN 29
+#define XT_EXTENSION_MAXNAMELEN 32
 #define XT_TABLE_MAXNAMELEN 32
 
 struct xt_entry_match {
#1 lore raw
Quoted 5 lines · Cong Wang

Hi, netfilter experts,

A customer wants to increase XT_EXTENSION_MAXNAMELEN to at least 31 (1 for '\0'), so I just increase it to 32. Do you have any comments or objections for the following patch?

This is a no-no. You are breaking the ABI.

#2 lore raw
Quoted 9 lines · Jan Engelhardt
Quoted 5 lines · Cong Wang

Hi, netfilter experts,

A customer wants to increase XT_EXTENSION_MAXNAMELEN to at least 31 (1 for '\0'), so I just increase it to 32. Do you have any comments or objections for the following patch?

This is a no-no. You are breaking the ABI.

Agreed. Sorry Cong, you cannot do that.

author
#3 lore raw
Quoted 5 lines · Pablo Neira Ayuso
Quoted 4 lines · Jan Engelhardt
Quoted 2 lines · Cong Wang

Hi, netfilter experts,

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

A customer wants to increase XT_EXTENSION_MAXNAMELEN to at least 31 (1 for '\0'), so I just increase it to 32. Do you have any comments or objections for the following patch?

This is a no-no. You are breaking the ABI.

Agreed. Sorry Cong, you cannot do that.

Ok, no problem.

I knew this could break user-space iptables, so there must be some other applications relying on this ABI too, hmm... I will tell the customer this is not possible to change.

Thanks!