diff options
author | Aaron Conole <aconole@redhat.com> | 2019-05-21 14:16:30 -0400 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2019-05-24 09:50:53 -0700 |
commit | 8c7130da98c55bdf13eae62b5250434f8dfd366b (patch) | |
tree | b3c66b7d9ff596f1809f4eac4fd8d26d7763162f /include/linux | |
parent | fbc22735fd0d830d1e9367eb42a3feeb3615c449 (diff) | |
download | openvswitch-8c7130da98c55bdf13eae62b5250434f8dfd366b.tar.gz |
compat: add SCTP netfilter states for older kernels
Bake in the SCTP states from the kernel UAPI. This means an older
revision of the kernel headers won't interfere with the SCTP display
enhancement. Additionally, if a newer version is available, or if
x-compiling the datapath module we defer to that version (since this
is just meant to provide the missing definitions).
This will be used in a future commit.
Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/automake.mk | 1 | ||||
-rw-r--r-- | include/linux/netfilter/nf_conntrack_sctp.h | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/include/linux/automake.mk b/include/linux/automake.mk index 45271d1d5..24f85200b 100644 --- a/include/linux/automake.mk +++ b/include/linux/automake.mk @@ -1,4 +1,5 @@ noinst_HEADERS += \ + include/linux/netfilter/nf_conntrack_sctp.h \ include/linux/pkt_cls.h \ include/linux/tc_act/tc_pedit.h \ include/linux/tc_act/tc_skbedit.h \ diff --git a/include/linux/netfilter/nf_conntrack_sctp.h b/include/linux/netfilter/nf_conntrack_sctp.h new file mode 100644 index 000000000..03b659052 --- /dev/null +++ b/include/linux/netfilter/nf_conntrack_sctp.h @@ -0,0 +1,26 @@ +#ifndef __LINUX_NETFILTER_CONNTRACK_SCTP_WRAPPER_H +#define __LINUX_NETFILTER_CONNTRACK_SCTP_WRAPPER_H 1 + +#if defined(__KERNEL__) || defined(HAVE_SCTP_CONNTRACK_HEARTBEATS) +#include_next <linux/netfilter/nf_conntrack_sctp.h> +#else + +/* These are the states defined in the kernel UAPI for connection + * tracking. */ +enum sctp_conntrack { + SCTP_CONNTRACK_NONE, + SCTP_CONNTRACK_CLOSED, + SCTP_CONNTRACK_COOKIE_WAIT, + SCTP_CONNTRACK_COOKIE_ECHOED, + SCTP_CONNTRACK_ESTABLISHED, + SCTP_CONNTRACK_SHUTDOWN_SENT, + SCTP_CONNTRACK_SHUTDOWN_RECD, + SCTP_CONNTRACK_SHUTDOWN_ACK_SENT, + SCTP_CONNTRACK_HEARTBEAT_SENT, + SCTP_CONNTRACK_HEARTBEAT_ACKED, + SCTP_CONNTRACK_MAX +}; + +#endif + +#endif |