]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/netfilter/xt_sctp.c
Merge branch 'for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata
[karo-tx-linux.git] / net / netfilter / xt_sctp.c
index 4dedb96d1a067de6c9766017642e16f9b148d616..2d2fa1d53ea6b3487a474d360a7043e60438e131 100644 (file)
@@ -42,8 +42,8 @@ match_packet(const struct sk_buff *skb,
             bool *hotdrop)
 {
        u_int32_t chunkmapcopy[256 / sizeof (u_int32_t)];
-       const sctp_chunkhdr_t *sch;
-       sctp_chunkhdr_t _sch;
+       const struct sctp_chunkhdr *sch;
+       struct sctp_chunkhdr _sch;
        int chunk_match_type = info->chunk_match_type;
        const struct xt_sctp_flag_info *flag_info = info->flag_info;
        int flag_count = info->flag_count;
@@ -118,8 +118,8 @@ static bool
 sctp_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_sctp_info *info = par->matchinfo;
-       const sctp_sctphdr_t *sh;
-       sctp_sctphdr_t _sh;
+       const struct sctphdr *sh;
+       struct sctphdr _sh;
 
        if (par->fragoff != 0) {
                pr_debug("Dropping non-first fragment.. FIXME\n");
@@ -136,13 +136,13 @@ sctp_mt(const struct sk_buff *skb, struct xt_action_param *par)
 
        return  SCCHECK(ntohs(sh->source) >= info->spts[0]
                        && ntohs(sh->source) <= info->spts[1],
-                       XT_SCTP_SRC_PORTS, info->flags, info->invflags)
-               && SCCHECK(ntohs(sh->dest) >= info->dpts[0]
+                       XT_SCTP_SRC_PORTS, info->flags, info->invflags) &&
+               SCCHECK(ntohs(sh->dest) >= info->dpts[0]
                        && ntohs(sh->dest) <= info->dpts[1],
-                       XT_SCTP_DEST_PORTS, info->flags, info->invflags)
-               && SCCHECK(match_packet(skb, par->thoff + sizeof(sctp_sctphdr_t),
-                                       info, &par->hotdrop),
-                          XT_SCTP_CHUNK_TYPES, info->flags, info->invflags);
+                       XT_SCTP_DEST_PORTS, info->flags, info->invflags) &&
+               SCCHECK(match_packet(skb, par->thoff + sizeof(_sh),
+                                    info, &par->hotdrop),
+                       XT_SCTP_CHUNK_TYPES, info->flags, info->invflags);
 }
 
 static int sctp_mt_check(const struct xt_mtchk_param *par)