[Swan-dev] building: do not abuse USE_IPTABLES or USE_NFTABLES

Andrew Cagney andrew.cagney at gmail.com
Tue Dec 26 17:01:58 EET 2023


On Sun, 24 Dec 2023 at 19:02, Andrew Cagney <andrew.cagney at gmail.com> wrote:
>
> On Sun, 24 Dec 2023 at 16:55, Paul Wouters <paul at vault.libreswan.fi> wrote:
> >
> > New commits:
> > commit 52c5cecda7543c4910a075a68e684469bacbbbd7
> > Author: Paul Wouters <paul.wouters at aiven.io>
> > Date:   Sun Dec 24 16:51:45 2023 -0500
> >
> >     building: do not abuse USE_IPTABLES or USE_NFTABLES
> >
> >     These defines were misused to see if we were compiling for Linux.
> >
> >     Introduce USE_CAT and USE_NFLOG instead. Disable keywords and
> >     whack commands when OS does not support them.
> >
> >     Note that leftcat/rightcat has no corresponding whack option.
>
> Are you sure about this:
>
> @@ -600,7 +601,9 @@ static bool ikev2_set_internal_address(struct
> pbs_in *cp_a_pbs,
>       selector_from_address(ip),
>       "CAT: scribbling on end while ignoring TS");
>   }
> - } else if (connection_requires_tss(cc) == NULL) {
> + } else
> +#endif
> + if (connection_requires_tss(cc) == NULL) {
>   update_end_selector(cc, cc->local->config->index,
>       selector_from_address(ip),
>       "CP scribbling on end while ignoring TS");

It changed:

     if (cat)
         if (...)
         else scrible on SPDs
    else if (not tss)
        scribble on SPDs

to

     if (cat)
         if (...)
         else
            scrible on SPDs
    if (not TSS)
        scribble on SPDs

which is wrong.

Given this change was cosmetic I'm assuming it wasn't for 5.0.


More information about the Swan-dev mailing list