47 lines
1.6 KiB
Diff
47 lines
1.6 KiB
Diff
From: Ben Hutchings <ben@decadent.org.uk>
|
|
Date: Sun, 01 Jun 2014 23:29:17 +0100
|
|
Subject: netfilter: Avoid ABI change in 3.14.5
|
|
|
|
The types of fields in struct nf_ct_ext were changed by commit
|
|
223b02d923ec ("netfilter: nf_conntrack: reserve two bytes for
|
|
nf_ct_ext->len") as u8 is not large enough to store the offsets
|
|
that may be needed now.
|
|
|
|
This ABI change should only affect the conntrack extension modules,
|
|
which must be in-tree as they have centrally assigned numbers.
|
|
However the structure definition is visible to all modules using
|
|
conntrack at all. Hide the ABI change from genksyms and use a macro
|
|
to rename the extension registration function so that it is still not
|
|
possible to mismatch conntrack core and extension modules.
|
|
|
|
--- a/include/net/netfilter/nf_conntrack_extend.h
|
|
+++ b/include/net/netfilter/nf_conntrack_extend.h
|
|
@@ -47,8 +47,19 @@ enum nf_ct_ext_id {
|
|
/* Extensions: optional stuff which isn't permanently in struct. */
|
|
struct nf_ct_ext {
|
|
struct rcu_head rcu;
|
|
+#ifdef __GENKSYMS__
|
|
+ /* Layout expected by modules calling nf_ct_extend_register()
|
|
+ * (which has been removed)
|
|
+ */
|
|
+ u8 offset[NF_CT_EXT_NUM];
|
|
+ u8 len;
|
|
+#else
|
|
+ /* Layout expected by modules calling nf_ct_extend_register_16()
|
|
+ * (all newly built modules, thanks to macro definition below)
|
|
+ */
|
|
u16 offset[NF_CT_EXT_NUM];
|
|
u16 len;
|
|
+#endif
|
|
char data[0];
|
|
};
|
|
|
|
@@ -118,6 +129,7 @@ struct nf_ct_ext_type {
|
|
u8 alloc_size;
|
|
};
|
|
|
|
+#define nf_ct_extend_register nf_ct_extend_register_16
|
|
int nf_ct_extend_register(struct nf_ct_ext_type *type);
|
|
void nf_ct_extend_unregister(struct nf_ct_ext_type *type);
|
|
#endif /* _NF_CONNTRACK_EXTEND_H */
|