#19001: ar71xx is BIG-ENDIAN. Kamailo4 (probably Kamalio3) packages contain
SHA1
and MD5 modules which are compiled as LITTLE-ENDIAN
-------------------------------------+-----------------------------------
Reporter: anonymous | Owner: developers
Type: defect | Status: new
Priority: normal | Milestone:
Component: packages | Version: Barrier Breaker 14.07
Keywords: telephony kamailio auth |
-------------------------------------+-----------------------------------
cat 010-endiness.patch
{{{
--- 1/md5.c 2015-02-10 06:29:01.000000000 -0800
+++ 2/md5.c 2015-02-10 18:30:53.840415256 -0800
@@ -160,6 +160,7 @@
#ifndef WORDS_BIGENDIAN
memcpy(in, block, sizeof(in));
#else
+#warning WORDS_BIGENDIAN set!!
for (a = 0; a < MD5_BLOCK_LENGTH / 4; a++) {
in[a] = (u_int32_t)(
(u_int32_t)(block[a * 4 + 0]) |
diff -ru 1/modules/acc/diam_message.h 2/modules/acc/diam_message.h
--- 1/modules/acc/diam_message.h 2015-02-10 06:29:01.000000000
-0800
+++ 2/modules/acc/diam_message.h 2015-02-10 17:41:32.796408282
-0800
@@ -78,7 +78,6 @@
#define ST_MSG_CODE 0x13010000
#define MASK_MSG_CODE 0xffffff00
#else
- #error BIG endian detected!!
#define AS_MSG_CODE 0x00000112
#define AC_MSG_CODE 0x0000010f
#define CE_MSG_CODE 0x00000101
diff -ru 1/modules/auth_diameter/diameter_msg.h
2/modules/auth_diameter/diameter_msg.h
--- 1/modules/auth_diameter/diameter_msg.h 2015-02-10
06:29:01.000000000 -0800
+++ 2/modules/auth_diameter/diameter_msg.h 2015-02-10
17:41:50.112408323 -0800
@@ -69,7 +69,6 @@
#define ST_MSG_CODE 0x13010000
#define MASK_MSG_CODE 0xffffff00
#else
- #error BIG endian detected!!
#define AS_MSG_CODE 0x00000112
#define AC_MSG_CODE 0x0000010f
#define CE_MSG_CODE 0x00000101
diff -ru 1/modules/cdp/diameter.h 2/modules/cdp/diameter.h
--- 1/modules/cdp/diameter.h 2015-02-10 06:29:01.000000000 -0800
+++ 2/modules/cdp/diameter.h 2015-02-10 17:42:08.848408367 -0800
@@ -116,7 +116,6 @@
#define ST_MSG_CODE 0x13010000
#define MASK_MSG_CODE 0xffffff00
#else
- #error BIG endian detected!!
#define AS_MSG_CODE 0x00000112
#define AC_MSG_CODE 0x0000010f
#define CE_MSG_CODE 0x00000101
}}}
Make file was changed to
PKG_MAKE_ARGS:= \
prefix=/ \
cfg_dir=/etc/kamailio/ \
bin_dir=/usr/sbin/ \
data_dir=/usr/share/kamailio/ \
lib_dir=/usr/lib/kamailio/ \
modules_dir=/usr/lib/kamailio/ \
include_modules="$(INCL_MODULES)" \
cfg_target:=/etc/kamailio/ \
TLS_HOOKS=1 \
extra_defs="-DUSE_PTHREAD_MUTEX '''-DWORDS_BIGENDIAN'''" \
CFLAGS="$(TARGET_CFLAGS)" \
LOCALBASE="$(STAGING_DIR)/usr" \
SYSBASE="$(STAGING_DIR)/usr" \
PCREDEFS:="$(TARGET_CPPFLAGS)" \
PCRELIBS:="$(TARGET_LDFLAGS)" \
CROSS_COMPILE=$(TARGET_CROSS) \
CC="$(TARGET_CC)" \
ARCH="$(ARCH)" \
DESTDIR=$(PKG_INSTALL_DIR) \
quiet=verbose
It is not ready to use solution, it was just hack to compile it for TP-
LINK wdr4300
--
Ticket URL: <https://dev.openwrt.org/ticket/19001>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets