]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
tarpit: resolve argument passing order mix-up for tarpit_tg6
authorJan Engelhardt <jengelh@inai.de>
Thu, 9 Oct 2025 20:30:24 +0000 (22:30 +0200)
committerJan Engelhardt <jengelh@inai.de>
Thu, 9 Oct 2025 20:30:24 +0000 (22:30 +0200)
extensions/xt_TARPIT.c

index 0994af308de9487e5d3620aaba64c2f121368bcd..d7bb3611223d3f1e65fbc332077f0b62cf49aa2b 100644 (file)
@@ -150,6 +150,10 @@ static void xttarpit_reset(struct tcphdr *tcph, const struct tcphdr *oth)
        tcph->ack_seq = oth->seq;
 }
 
+/**
+ * @tcph: newly-being-built transport header
+ * @oth:  original transport header
+ */
 static bool tarpit_generic(struct tcphdr *tcph, const struct tcphdr *oth,
     uint16_t payload, unsigned int mode)
 {
@@ -389,7 +393,7 @@ static void tarpit_tcp6(const struct xt_action_param *par,
        ((uint8_t *)tcph)[13] = 0;
 
        payload = nskb->len - sizeof(struct ipv6hdr) - sizeof(struct tcphdr);
-       if (!tarpit_generic(&oth, tcph, payload, mode))
+       if (!tarpit_generic(tcph, &oth, payload, mode))
                goto free_nskb;
 
        ip6h->payload_len = htons(sizeof(struct tcphdr));