From 54185b4302638bda745b7459ed618bb072b41c71 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Mon, 11 Sep 2017 21:12:13 +0200 Subject: Backport patch: sctp: remove the typedef sctp_sctphdr_t --- kernel/include/linux/netfilter/ipset/ip_set_compat.h.in | 1 + kernel/net/netfilter/ipset/ip_set_getport.c | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'kernel') diff --git a/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in b/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in index 667a6b0..2630600 100644 --- a/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in +++ b/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in @@ -42,6 +42,7 @@ #@HAVE_NETLINK_EXTENDED_ACK@ HAVE_NETLINK_EXTENDED_ACK #@HAVE_PASSING_EXTENDED_ACK_TO_PARSERS@ HAVE_PASSING_EXTENDED_ACK_TO_PARSERS #@HAVE_PASSING_EXTENDED_ACK_TO_CALLBACKS@ HAVE_PASSING_EXTENDED_ACK_TO_CALLBACKS +#@HAVE_TYPEDEF_SCTP_SCTPHDR_T@ HAVE_TYPEDEF_SCTP_SCTPHDR_T #ifdef HAVE_EXPORT_SYMBOL_GPL_IN_MODULE_H #include diff --git a/kernel/net/netfilter/ipset/ip_set_getport.c b/kernel/net/netfilter/ipset/ip_set_getport.c index 528e94c..8614bcd 100644 --- a/kernel/net/netfilter/ipset/ip_set_getport.c +++ b/kernel/net/netfilter/ipset/ip_set_getport.c @@ -39,8 +39,13 @@ get_port(const struct sk_buff *skb, int protocol, unsigned int protooff, break; } case IPPROTO_SCTP: { +#ifdef HAVE_TYPEDEF_SCTP_SCTPHDR_T sctp_sctphdr_t _sh; const sctp_sctphdr_t *sh; +#else + struct sctphdr _sh; + const struct sctphdr *sh; +#endif sh = skb_header_pointer(skb, protooff, sizeof(_sh), &_sh); if (!sh) -- cgit v1.2.1