Make nf conntrack uapi binary compatible w 4.1 kernel
Mindspeed added new values to the two enums ip_conntrack_status and enum
ctattr_type. The problem is that upstream also added new values to these
enums which now overlap with the Mindspeed ones. More specifically,
upstream added IPS_HELPER_BIT = 13 which overlaps with IPS_PERMANENT_BIT
= 13. They also added CTA_MARK_MASK, CTA_LABELS and CTA_LABELS_MASK
which overlap with CTA_COMCERTO_FP_ORIG and CTA_COMCERTO_FP_ORIG.
As a result, we would need different versions of libnetfilter_conntrack
for the old and new kernel. To avoid this, we make the binary interface
of the 3.2 and 4.1 kernel consistent.
Change-Id: I3cb61cdba35f79f536872589e4a2e7fa311e4828
diff --git a/include/linux/netfilter/nf_conntrack_common.h b/include/linux/netfilter/nf_conntrack_common.h
index 3ca1f46..52de8bd 100644
--- a/include/linux/netfilter/nf_conntrack_common.h
+++ b/include/linux/netfilter/nf_conntrack_common.h
@@ -85,12 +85,12 @@
IPS_UNTRACKED = (1 << IPS_UNTRACKED_BIT),
/* Connection cannot expire */
- IPS_PERMANENT_BIT = 13,
+ IPS_PERMANENT_BIT = 24,
IPS_PERMANENT = (1 << IPS_PERMANENT_BIT),
#ifdef CONFIG_COMCERTO_FP
/* Connection is assured by DPI application */
- IPS_DPI_ALLOWED_BIT = 14,
+ IPS_DPI_ALLOWED_BIT = 25,
IPS_DPI_ALLOWED = (1 << IPS_DPI_ALLOWED_BIT),
#endif
};
diff --git a/include/linux/netfilter/nfnetlink_conntrack.h b/include/linux/netfilter/nfnetlink_conntrack.h
index fb0dd93..047edb7 100644
--- a/include/linux/netfilter/nfnetlink_conntrack.h
+++ b/include/linux/netfilter/nfnetlink_conntrack.h
@@ -43,7 +43,7 @@
CTA_ZONE,
CTA_SECCTX,
CTA_TIMESTAMP,
- CTA_COMCERTO_FP_ORIG,
+ CTA_COMCERTO_FP_ORIG = 32,
CTA_COMCERTO_FP_REPLY,
__CTA_MAX
};