eui64_to_privacy broken for big-endian architectures
Hi Peter and other ipv6calc list members, it looks like the ipv6calc RFC3041 (privacy extensions) code is broken on big-endian systems. The Debian automatic build daemon logs indicate that the test '--eui64_to_privacy' is failing on these architectures: s390 mips sparc hppa m68k It's working on these: arm alpha powerpc mipsel ia64 amd64 i386 AFAIK, this looks like a list of big-endian vs. little-endian systems. In particular, mipsel is just the same as mips but little-endian. The result on the failed ones is: Test './ipv6calc --eui64_to_privacy 0123:4567:89ab:cdef 0123456789abcdef' for '4662:bdea:8654:776d 486072ff7074945e' Result '96de:eee5:308c:8ea7 df277f120cf06be3' doesn't match! The full build logs can be found at http://buildd.debian.org/build.php?arch=&pkg=ipv6calc I haven't investigated this much yet. I can get my hands on a sparc machine probably tomorrow, so I'm well positioned to test this. I'll get back to this when I have a patch. The problem has been there at least since 0.45, so it's not a new regression. It just wasn't noticed earlier. I'm CCing 375855-forwarded@bugs.debian.org - please keep the CC when responding so the information in the Debian bug database stays up to date. Cheers, -- Niko Tyni ntyni@iki.fi
tags 375855 patch thanks On Wed, Jun 28, 2006 at 09:27:10PM +0300, Niko Tyni wrote:
Hi Peter and other ipv6calc list members,
it looks like the ipv6calc RFC3041 (privacy extensions) code is broken on big-endian systems.
OK, the problem is that the _BIG_ENDIAN macro isn't defined in 'sys/types.h' on Linux. It is on Solaris, which is probably why this hasn't been noticed earlier. The macro is needed by the md5 code. I'm attaching a patch that adds the AC_C_BIGENDIAN test to configure.in. It also makes md5.c include "config.h" for the result. Finally, it makes the test run in the 'ipv6calc' subdirectory exit with an error code if there is a failure, so failed tests won't go unnoticed anymore. Obviously, autoconf and autoheader need to be re-run after this patch is applied. I have tested the patch on Debian/x86 and Debian/sparc and on Solaris/sparc. Cheers, -- Niko Tyni ntyni@iki.fi
Niko Tyni schrieb:
tags 375855 patch thanks
On Wed, Jun 28, 2006 at 09:27:10PM +0300, Niko Tyni wrote:
Hi Peter and other ipv6calc list members,
it looks like the ipv6calc RFC3041 (privacy extensions) code is broken on big-endian systems.
OK, the problem is that the _BIG_ENDIAN macro isn't defined in 'sys/types.h' on Linux. It is on Solaris, which is probably why this hasn't been noticed earlier. The macro is needed by the md5 code.
I'm attaching a patch that adds the AC_C_BIGENDIAN test to configure.in. It also makes md5.c include "config.h" for the result. Finally, it makes the test run in the 'ipv6calc' subdirectory exit with an error code if there is a failure, so failed tests won't go unnoticed anymore.
Obviously, autoconf and autoheader need to be re-run after this patch is applied.
I have tested the patch on Debian/x86 and Debian/sparc and on Solaris/sparc.
Patch applied to CVS after autoconf/autoheader run. Can you please recheck, if ok, I would release 0.60.1 next days. Thank you very much, 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/ OpenBC http://www.openbc.com/hp/Peter_Bieringer/ Personal invitation to OpenBC http://www.openbc.com/go/invita/3889
On Fri, Jul 07, 2006 at 03:31:52PM +0200, Peter Bieringer wrote:
Patch applied to CVS after autoconf/autoheader run.
Can you please recheck, if ok, I would release 0.60.1 next days.
Hi, the file config.h.in, generated by autoheader, hasn't been updated in CVS. The fix isn't working without it. Cheers, -- Niko
Niko Tyni schrieb:
On Fri, Jul 07, 2006 at 03:31:52PM +0200, Peter Bieringer wrote:
Patch applied to CVS after autoconf/autoheader run.
Can you please recheck, if ok, I would release 0.60.1 next days.
Hi,
the file config.h.in, generated by autoheader, hasn't been updated in CVS. The fix isn't working without it.
Ooops, sorry, forgotten. Done and commited now. Should I add "autoheader" to "autogen.sh" also? 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/ OpenBC http://www.openbc.com/hp/Peter_Bieringer/ Personal invitation to OpenBC http://www.openbc.com/go/invita/3889
On Fri, Jul 07, 2006 at 04:38:58PM +0200, Peter Bieringer wrote:
the file config.h.in, generated by autoheader, hasn't been updated in CVS. The fix isn't working without it.
Ooops, sorry, forgotten. Done and commited now.
OK, it's working for me now on Debian/x86, Debian/sparc and Solaris/sparc.
Should I add "autoheader" to "autogen.sh" also?
Yes, I suppose. Cheers, -- Niko
Niko Tyni schrieb:
Should I add "autoheader" to "autogen.sh" also?
Yes, I suppose.
Ok, done. BTW: I've made changes according to warning to suppress them: autoheader: WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' autoheader: WARNING: and `config.h.top', to define templates for `config.h.in' autoheader: WARNING: is deprecated and discouraged. autoheader: autoheader: WARNING: Using the third argument of `AC_DEFINE' and autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without autoheader: WARNING: `acconfig.h': autoheader: autoheader: WARNING: AC_DEFINE([NEED_FUNC_MAIN], 1, autoheader: [Define if a function `main' is needed.]) autoheader: autoheader: WARNING: More sophisticated templates can also be produced, see the autoheader: WARNING: documentation. But autoheader: warning: missing template: IPV6CALC_VERSION autoheader: Use AC_DEFINE([IPV6CALC_VERSION], [], [Description]) -> similar done. Can you run an additional check? Thank you very much. BTW: any idea how to fill PACKAGE_* in config.h 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/ OpenBC http://www.openbc.com/hp/Peter_Bieringer/ Personal invitation to OpenBC http://www.openbc.com/go/invita/3889
On Fri, Jul 07, 2006 at 05:41:07PM +0200, Peter Bieringer wrote:
Can you run an additional check?
Looks good to me.
BTW: any idea how to fill PACKAGE_* in config.h
Those come from AC_INIT. The modern way of calling it is AC_INIT (PACKAGE, VERSION, [BUG-REPORT], [TARNAME]) I guess that means maintaining the version number there instead of the VERSION file. Or you could just put a '-' there and keep using IPV6CALC_VERSION instead of PACKAGE_VERSION, of course. Cheers, -- Niko
Niko Tyni schrieb:
On Fri, Jul 07, 2006 at 05:41:07PM +0200, Peter Bieringer wrote:
Can you run an additional check?
Looks good to me.
BTW: any idea how to fill PACKAGE_* in config.h
Those come from AC_INIT. The modern way of calling it is
AC_INIT (PACKAGE, VERSION, [BUG-REPORT], [TARNAME])
I guess that means maintaining the version number there instead of the VERSION file. Or you could just put a '-' there and keep using IPV6CALC_VERSION instead of PACKAGE_VERSION, of course.
I have changed this now to this more nicer version. If one has some free minutes, feel free to run next tests. Thank you very much. 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/ OpenBC http://www.openbc.com/hp/Peter_Bieringer/ Personal invitation to OpenBC http://www.openbc.com/go/invita/3889
On Mon, Jul 10, 2006 at 01:45:28PM +0200, Peter Bieringer wrote:
AC_INIT (PACKAGE, VERSION, [BUG-REPORT], [TARNAME])
I have changed this now to this more nicer version. If one has some free minutes, feel free to run next tests.
Hi, it works for me. Cheers, -- Niko Tyni ntyni@iki.fi
participants (2)
-
Niko Tyni
-
Peter Bieringer