[Swan-dev] virtual %4 notation mistake

Paul Wouters paul at nohats.ca
Sat Apr 19 18:57:06 EEST 2014


On Sat, 19 Apr 2014, D. Hugh Redelmeier wrote:

> I'm looking at (tidying) programs/pluto/virtual.c
>
> _read_subnet() accepts a notation for the AF:
> 	%v6 for AF_INET6 (IPv6)
> 	%v4 for AF_INET (IPv4)
>
> It also reluctantly accepts %4 for AF_INET.
> This code is commented:
> 	/* workaround for typo "%4:" instead of "%v4:" introduced in old openswan release*/
> and logs a (not-too-explicit) RC_LOG_SERIOUS warning.
>
> Can we ditch this?

Yes. The reason it was there was that an ipsec.conf we shipped contained
the typo and was getting installed at various distro's at the default.
But that was years ago.

> BTW, shouldn't the code be able to guess the AF from the syntax, without
> needing a prefix?

Yes, if you add that I'm happy for you to eat the %v[46] silently and
will update docs and stock configs to no longer need the prefix.

> Do we need a registry of obsolete stuff so we can find it and delete it
> when it is time?

We could make a wiki page in the developer section of the wiki ?

Paul


More information about the Swan-dev mailing list