]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
extensions: ipcomp: Add comment to clarify xlate callback
authorPhil Sutter <phil@nwl.cc>
Tue, 15 Mar 2022 10:58:37 +0000 (11:58 +0100)
committerPhil Sutter <phil@nwl.cc>
Thu, 24 Nov 2022 09:24:06 +0000 (10:24 +0100)
Kernel ignores 'hdrres' field, this matching on reserved field value was
never effective.

While being at it, drop its description from man page. Continue to parse
and print it for compatibility reasons, but avoid attracting new users.

Signed-off-by: Phil Sutter <phil@nwl.cc>
extensions/libxt_ipcomp.c
extensions/libxt_ipcomp.c.man

index b5c43128466fb60bb4d3be52a69b09b1dde02b77..4171c4a1c4eb74b8a387c2452ab6a851159d7df3 100644 (file)
@@ -101,6 +101,8 @@ static int comp_xlate(struct xt_xlate *xl,
        const struct xt_ipcomp *compinfo =
                (struct xt_ipcomp *)params->match->data;
 
+       /* ignore compinfo->hdrres like kernel's xt_ipcomp.c does */
+
        xt_xlate_add(xl, "comp cpi %s",
                     compinfo->invflags & XT_IPCOMP_INV_SPI ? "!= " : "");
        if (compinfo->spis[0] != compinfo->spis[1])
index f3b17d21676975a10ab52c3f83535c8b103b86d3..824f5b3d9dbb4c3e6e5c074f592f45e995443c73 100644 (file)
@@ -2,6 +2,3 @@ This module matches the parameters in IPcomp header of IPsec packets.
 .TP
 [\fB!\fP] \fB\-\-ipcompspi\fP \fIspi\fP[\fB:\fP\fIspi\fP]
 Matches IPcomp header CPI value.
-.TP
-\fB\-\-compres\fP
-Matches if the reserved field is filled with zero.