Jan Engelhardt wrote:
For coming Xtables patches, we want to use PF_UNSPEC, but NF_ARP
currently evaluates to the same value so it gets changed. The
constant is renamed to NFPROTO_ARP, in the naming spirit of
IPPROTO_*.
+enum {
+ __NFPROTO_MIN = AF_MAX,
+ NFPROTO_ARP,
+ __NFPROTO_MAX,
+};
+
-extern struct list_head nf_hooks[NPROTO][NF_MAX_HOOKS];
+extern struct list_head nf_hooks[][NF_MAX_HOOKS];
[...]
- xt = kmalloc(sizeof(struct xt_af) * NPROTO, GFP_KERNEL);
+ xt = kmalloc(sizeof(struct xt_af) * __NFPROTO_MAX, GFP_KERNEL);
Thats quite ugly. I'd also prefer to keep the size in
the nf_hooks declaration and elsewhere.
How about:
enum {
__NFPROTO_MIN = AF_MAX - 1, (AF_MAX is actually max + 1)
NFPROTO_ARP,
__NFPROTO_MAX
};
#define NFPROTO_MAX (__NFPROTO_MAX - 1)
The array declarations should then use NFPROTO_MAX + 1.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html