Re: ipv6calc bug with base85 input line starting with dash
qm wrote:
$ ipv6calc --in ipv6addr 'F677:73F6:11B4:5073:4A06:76C2:CEAE:1474' --out base85 -------------------- $ ipv6calc --in base85 '--------------------' --out ipv6addr ipv6calc: unrecognized option `--------------------' ipv6calc: version 0.50 (P) & (C) 2001-2005 by Peter Bieringer <pb (at) bieringer.de> Missing or to few input data given! $
ipv6calc does not recognize an IPv6 base85 20 character string starting with a dash as an argument to be parsed for input.
This is a bug.
One method to detect this is a string of twenty characters. Another method to detect it is via the unrecognized option failure.
Bug also present in 0.45.
Looks like this is a problem caused by the getopt implementation: $ ipv6calc --in base85 '=F>@nLbSH5WQ%YIL3i%h' --out ipv6addr fe80::1 $ ipv6calc --in base85 '-F>@nLbSH5WQ%YIL3i%h' --out ipv6addr ipv6calc: invalid option -- F ipv6calc: invalid option -- > ipv6calc: invalid option -- @ ipv6calc: invalid option -- n ipv6calc: invalid option -- L ipv6calc: version 0.50 (P) & (C) 2001-2005 by Peter Bieringer <pb (at) bieringer.de> Only one command may be specified! Have to dig into how to work around. Thank you for reporting. Peter -- Dr. Peter Bieringer http://www.bieringer.de/pb/ GPG/PGP Key 0x958F422D mailto:pb@bieringer.de Deep Space 6 Co-Founder and Core Member http://www.deepspace6.net/
Peter Bieringer wrote:
qm wrote:
$ ipv6calc --in ipv6addr 'F677:73F6:11B4:5073:4A06:76C2:CEAE:1474' --out base85 -------------------- $ ipv6calc --in base85 '--------------------' --out ipv6addr ipv6calc: unrecognized option `--------------------' ipv6calc: version 0.50 (P) & (C) 2001-2005 by Peter Bieringer <pb (at) bieringer.de> Missing or to few input data given! $
ipv6calc does not recognize an IPv6 base85 20 character string starting with a dash as an argument to be parsed for input.
This is a bug.
One method to detect this is a string of twenty characters. Another method to detect it is via the unrecognized option failure.
Bug also present in 0.45.
Looks like this is a problem caused by the getopt implementation:
$ ipv6calc --in base85 '=F>@nLbSH5WQ%YIL3i%h' --out ipv6addr fe80::1
$ ipv6calc --in base85 '-F>@nLbSH5WQ%YIL3i%h' --out ipv6addr ipv6calc: invalid option -- F ipv6calc: invalid option -- > ipv6calc: invalid option -- @ ipv6calc: invalid option -- n ipv6calc: invalid option -- L ipv6calc: version 0.50 (P) & (C) 2001-2005 by Peter Bieringer <pb (at) bieringer.de> Only one command may be specified!
Have to dig into how to work around.
Thank you for reporting.
Peter
Using -- stops it reading options:
./ipv6calc --out ipv6addr --in base85 -- '--------------------' f677:73f6:11b4:5073:4a06:76c2:ceae:1474
-- Simon Arlott
Simon Arlott wrote:
Peter Bieringer wrote:
qm wrote:
$ ipv6calc --in ipv6addr 'F677:73F6:11B4:5073:4A06:76C2:CEAE:1474' --out base85 -------------------- $ ipv6calc --in base85 '--------------------' --out ipv6addr ipv6calc: unrecognized option `--------------------' ipv6calc: version 0.50 (P) & (C) 2001-2005 by Peter Bieringer <pb (at) bieringer.de> Missing or to few input data given! $ ipv6calc does not recognize an IPv6 base85 20 character string starting with a dash as an argument to be parsed for input.
This is a bug.
One method to detect this is a string of twenty characters. Another method to detect it is via the unrecognized option failure.
Bug also present in 0.45.
Looks like this is a problem caused by the getopt implementation:
$ ipv6calc --in base85 '=F>@nLbSH5WQ%YIL3i%h' --out ipv6addr fe80::1
$ ipv6calc --in base85 '-F>@nLbSH5WQ%YIL3i%h' --out ipv6addr ipv6calc: invalid option -- F ipv6calc: invalid option -- > ipv6calc: invalid option -- @ ipv6calc: invalid option -- n ipv6calc: invalid option -- L ipv6calc: version 0.50 (P) & (C) 2001-2005 by Peter Bieringer <pb (at) bieringer.de> Only one command may be specified!
Have to dig into how to work around.
Thank you for reporting.
Peter
Using -- stops it reading options:
./ipv6calc --out ipv6addr --in base85 -- '--------------------' f677:73f6:11b4:5073:4a06:76c2:ceae:1474
I already expected such, thank you Simon for this quick reply. So I close this as "no bug". BTW: I plan to release 0.51 during Christmas Holidays, so if one misses in current CVS version still some features, trigger me. Check ChangeLog in CVS version, what's already done since 0.50. Peter -- Dr. Peter Bieringer http://www.bieringer.de/pb/ GPG/PGP Key 0x958F422D mailto:pb@bieringer.de Deep Space 6 Co-Founder and Core Member http://www.deepspace6.net/
participants (2)
-
Peter Bieringer
-
Simon Arlott