[strongSwan] ipsec stroke loglevel any -1 invalid option
noel at familie-kuntze.de
Mon Oct 13 23:18:03 CEST 2014
-----BEGIN PGP SIGNED MESSAGE-----
Sorry for the long time without a reply. I just forgot about it and stumbled upon it right now.
I'm using strongSwan 5.2.0,
"ipsec stroke -- loglevel any" doesn't work and returns status 2 and
"/usr/bin/ipsec: unknown option `--' (perhaps command name was omitted?)"
on stdout. "ipsec stroke loglevel any _1" works just fine.
I don't understand why _1 works.
Also, I don't work with the getopt library and have no idea how it works internally.
always write my own input validation code.
Mit freundlichen Grüßen/Regards,
GPG Key ID: 0x63EC6658
Fingerprint: 23CA BB60 2146 05E7 7278 6592 3839 298F 63EC 6658
Am 23.09.2014 um 00:27 schrieb Thomas Egerer:
> Hi Noel,
> On 09/22/2014 11:18 AM, Noel Kuntze wrote:
> > Hello,
> > Can anyone elaborate on why "ipsec stroke loglevel any -1" gives me "invalid option", but it works with the individual subsystems?
> I guess it's been added prior to 5.2.0 with git-commit
> dcb1684 stroke: Add --daemon option
> When Tobias added aforementioned option he changed the code
> to use of getopt_long. Judging from your posts to the list, I
> guess, I don't have to explain what this tries to do with
> your '-1' option ;)
> > ipsec stroke -- loglevel any
> for a change, and you should be fine.
> This does however not explain the behavior you describe about
> the modification of the loglevel for individial subsystems. I
> don't see how this would work, unless I'm totally wrong with
> my explanation. Are you sure about this? If so, and the
> resolution above does not solve your problem, please reply and
> post at least the strongswan version you are using.
> Cheers, Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-----END PGP SIGNATURE-----
More information about the Users