aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2018-10-07 19:12:56 -0700
committerKhem Raj <raj.khem@gmail.com>2018-10-07 21:45:20 -0700
commit9254a77848ec36a86e01b5a6d499c44a7be067d9 (patch)
tree99f999a08be7f6a07f611f1fbd78e4401b2e1098 /meta-networking
parent99ecc889a0909d54b6bb5c795087585adde1bfbd (diff)
downloadmeta-openembedded-9254a77848ec36a86e01b5a6d499c44a7be067d9.tar.gz
umip: fix recipe location typo
Since `36983fe umip: move to meta-networking' applied, it was moved to invalid location. Fix prior partial move to meta-networking Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-connectivity/umip/umip/0001-Add-format-string-to-fprintf-call.patch26
-rw-r--r--meta-networking/recipes-connectivity/umip/umip/0001-replace-SIGCLD-with-SIGCHLD-and-include-sys-types.h.patch38
-rw-r--r--meta-networking/recipes-connectivity/umip/umip/0001-support-openssl-1.1.x.patch88
-rw-r--r--meta-networking/recipes-connectivity/umip/umip/0002-replace-PTHREAD_MUTEX_FAST_NP-with-PTHREAD_MUTEX_NOR.patch143
-rw-r--r--meta-networking/recipes-connectivity/umip/umip/add-dependency-to-support-parallel-compilation.patch23
-rwxr-xr-xmeta-networking/recipes-connectivity/umip/umip/mip6d112
-rw-r--r--meta-networking/recipes-connectivity/umip/umip/mip6d.service10
-rw-r--r--meta-networking/recipes-connectivity/umip/umip_1.0.bb (renamed from meta-networking/recipes-connectivity/umip_1.0.bb)0
8 files changed, 440 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/umip/umip/0001-Add-format-string-to-fprintf-call.patch b/meta-networking/recipes-connectivity/umip/umip/0001-Add-format-string-to-fprintf-call.patch
new file mode 100644
index 0000000000..8e5f4da362
--- /dev/null
+++ b/meta-networking/recipes-connectivity/umip/umip/0001-Add-format-string-to-fprintf-call.patch
@@ -0,0 +1,26 @@
+From a0ad5128d14b022239445e251cf4a9826e86aa96 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 27 Jun 2017 07:48:31 -0700
+Subject: [PATCH] Add format string to fprintf() call
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/vt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/vt.c b/src/vt.c
+index 795d393..a533d3d 100644
+--- a/src/vt.c
++++ b/src/vt.c
+@@ -499,7 +499,7 @@ static int vt_cmd_dump_candidates(const struct vt_handle *vh,
+ }
+ llen += cmdlen;
+
+- ret = fprintf(vh->vh_stream, e->cmd);
++ ret = fprintf(vh->vh_stream, "%s", e->cmd);
+ if (ret < 0)
+ return ret;
+
+--
+2.13.2
+
diff --git a/meta-networking/recipes-connectivity/umip/umip/0001-replace-SIGCLD-with-SIGCHLD-and-include-sys-types.h.patch b/meta-networking/recipes-connectivity/umip/umip/0001-replace-SIGCLD-with-SIGCHLD-and-include-sys-types.h.patch
new file mode 100644
index 0000000000..153bced396
--- /dev/null
+++ b/meta-networking/recipes-connectivity/umip/umip/0001-replace-SIGCLD-with-SIGCHLD-and-include-sys-types.h.patch
@@ -0,0 +1,38 @@
+From f567740cf64978ac9db014c786b6d0267b244f33 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 4 Mar 2018 22:30:30 -0800
+Subject: [PATCH 1/2] replace SIGCLD with SIGCHLD and include sys/types.h
+
+Fixes
+main.c:129:10: error: 'SIGCLD' undeclared (first use in this function); did you mean 'SIGCHLD'?
+ signal(SIGCLD, sig_child);
+ ^~~~~~
+ SIGCHLD
+
+main.c:125:2: warning: implicit declaration of function 'umask' [-Wimplicit-function-declaration]
+ umask(0);
+ ^~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/main.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+Index: git/src/main.c
+===================================================================
+--- git.orig/src/main.c
++++ git/src/main.c
+@@ -133,9 +133,9 @@ static void daemon_start(int ignsigcld)
+
+ if (ignsigcld) {
+ #ifdef SIGTSTP
+- signal(SIGCLD, sig_child);
++ signal(SIGCHLD, sig_child);
+ #else
+- signal(SIGCLD, SIG_IGN);
++ signal(SIGCHLD, SIG_IGN);
+ #endif
+ }
+ }
diff --git a/meta-networking/recipes-connectivity/umip/umip/0001-support-openssl-1.1.x.patch b/meta-networking/recipes-connectivity/umip/umip/0001-support-openssl-1.1.x.patch
new file mode 100644
index 0000000000..d8355e25f2
--- /dev/null
+++ b/meta-networking/recipes-connectivity/umip/umip/0001-support-openssl-1.1.x.patch
@@ -0,0 +1,88 @@
+From 62784e8b6df8ff3a907c1f816154808bea9d7064 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 25 Sep 2018 14:38:14 +0800
+Subject: [PATCH] support openssl 1.1.x
+
+Long time no maintain from upstream since 2013
+(git://git.umip.org/umip/umip.git), backport a
+fix from openSUSE
+
+Upstream-Status: Backport [openSUSE]
+http://ftp.gwdg.de/pub/opensuse/source/distribution/leap/15.0/repo/oss/src/mipv6d-2.0.2.umip.0.4-lp150.1.2.src.rpm
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ src/keygen.c | 12 ++++++++++++
+ src/mh.c | 17 ++++++++++++++++-
+ 2 files changed, 28 insertions(+), 1 deletion(-)
+
+diff --git a/src/keygen.c b/src/keygen.c
+index e434a38..b902644 100644
+--- a/src/keygen.c
++++ b/src/keygen.c
+@@ -172,6 +172,7 @@ static void build_kgen_token(struct in6_addr *addr, uint8_t *nonce,
+ uint8_t tmp[20];
+ #ifdef HAVE_LIBCRYPTO
+ unsigned int len = 20;
++#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x1010006fL
+ HMAC_CTX ctx;
+
+ HMAC_CTX_init(&ctx);
+@@ -182,6 +183,17 @@ static void build_kgen_token(struct in6_addr *addr, uint8_t *nonce,
+ HMAC_Final(&ctx, tmp, &len);
+ HMAC_CTX_cleanup(&ctx);
+ #else
++ HMAC_CTX *ctx;
++ ctx = HMAC_CTX_new();
++ HMAC_Init_ex(ctx, key_cn, sizeof(key_cn), EVP_sha1(), NULL);
++ HMAC_Update(ctx, (unsigned char *)addr, sizeof(*addr));
++ HMAC_Update(ctx, nonce, NONCE_LENGTH);
++ HMAC_Update(ctx, &id, sizeof(id));
++ HMAC_Final(ctx, tmp, &len);
++ HMAC_CTX_free(ctx);
++#endif // End of defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x1010006fL
++
++#else
+ HMAC_SHA1_CTX ctx;
+
+ HMAC_SHA1_init(&ctx, key_cn, sizeof(key_cn));
+diff --git a/src/mh.c b/src/mh.c
+index cba9a33..212eb5a 100644
+--- a/src/mh.c
++++ b/src/mh.c
+@@ -518,9 +518,10 @@ static int calculate_auth_data(const struct iovec *iov, int iovlen,
+
+ #ifdef HAVE_LIBCRYPTO
+ unsigned int len = HMAC_SHA1_HASH_LEN;
+- HMAC_CTX ctx;
+ const EVP_MD *evp_md = EVP_sha1();
+
++#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x1010006fL
++ HMAC_CTX ctx;
+ HMAC_CTX_init(&ctx);
+ HMAC_Init_ex(&ctx, key, HMAC_SHA1_KEY_SIZE, evp_md, NULL);
+
+@@ -532,6 +533,20 @@ static int calculate_auth_data(const struct iovec *iov, int iovlen,
+ HMAC_Final(&ctx, buf, &len);
+ HMAC_CTX_cleanup(&ctx);
+ #else
++ HMAC_CTX *ctx;
++ ctx = HMAC_CTX_new();
++ HMAC_Init_ex(ctx, key, HMAC_SHA1_KEY_SIZE, evp_md, NULL);
++
++ HMAC_Update(ctx, (uint8_t *)coa, sizeof(*coa));
++ HMAC_Update(ctx, (uint8_t *)cn, sizeof(*coa));
++ for (i = 0; i < iovlen; i++) {
++ HMAC_Update(ctx, (uint8_t *)iov[i].iov_base, iov[i].iov_len);
++ }
++ HMAC_Final(ctx, buf, &len);
++ HMAC_CTX_free(ctx);
++#endif
++
++#else
+ HMAC_SHA1_CTX ctx;
+
+ HMAC_SHA1_init(&ctx, key, HMAC_SHA1_KEY_SIZE);
+--
+2.7.4
+
diff --git a/meta-networking/recipes-connectivity/umip/umip/0002-replace-PTHREAD_MUTEX_FAST_NP-with-PTHREAD_MUTEX_NOR.patch b/meta-networking/recipes-connectivity/umip/umip/0002-replace-PTHREAD_MUTEX_FAST_NP-with-PTHREAD_MUTEX_NOR.patch
new file mode 100644
index 0000000000..90d12da149
--- /dev/null
+++ b/meta-networking/recipes-connectivity/umip/umip/0002-replace-PTHREAD_MUTEX_FAST_NP-with-PTHREAD_MUTEX_NOR.patch
@@ -0,0 +1,143 @@
+From 19b6cf8099e1974b5fc39086fc54103b0cbc2658 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 4 Mar 2018 23:01:25 -0800
+Subject: [PATCH 2/2] replace PTHREAD_MUTEX_FAST_NP with PTHREAD_MUTEX_NORMAL
+
+PTHREAD_MUTEX_FAST_NP is not available on non-posix systems
+e.g. musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/ha.c | 2 +-
+ src/icmp6.c | 2 +-
+ src/mh.c | 2 +-
+ src/mn.c | 2 +-
+ src/movement.c | 2 +-
+ src/mpdisc_ha.c | 2 +-
+ src/mpdisc_mn.c | 2 +-
+ src/tqueue.c | 2 +-
+ src/tunnelctl.c | 2 +-
+ 9 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/src/ha.c b/src/ha.c
+index fbdcff0..b2f811e 100644
+--- a/src/ha.c
++++ b/src/ha.c
+@@ -1246,7 +1246,7 @@ int ha_init(void)
+ {
+ pthread_mutexattr_t mattrs;
+ pthread_mutexattr_init(&mattrs);
+- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ if (pthread_mutex_init(&bu_worker_mutex, &mattrs) ||
+ pthread_cond_init(&cond, NULL))
+ return -1;
+diff --git a/src/icmp6.c b/src/icmp6.c
+index 3695135..6460634 100644
+--- a/src/icmp6.c
++++ b/src/icmp6.c
+@@ -243,7 +243,7 @@ int icmp6_init(void)
+ return -1;
+ /* create ICMP listener thread */
+ pthread_mutexattr_init(&mattrs);
+- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ if (pthread_mutex_init(&icmp6_sock.send_mutex, &mattrs) ||
+ pthread_rwlock_init(&handler_lock, NULL) ||
+ pthread_create(&icmp6_listener, NULL, icmp6_listen, NULL))
+diff --git a/src/mh.c b/src/mh.c
+index 60e345e..7928f4c 100644
+--- a/src/mh.c
++++ b/src/mh.c
+@@ -204,7 +204,7 @@ int mh_init(void)
+ return -1;
+
+ pthread_mutexattr_init(&mattrs);
+- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ if (pthread_mutex_init(&mh_sock.send_mutex, &mattrs) ||
+ pthread_rwlock_init(&handler_lock, NULL) ||
+ pthread_create(&mh_listener, NULL, mh_listen, NULL))
+diff --git a/src/mn.c b/src/mn.c
+index 092cfcb..8f7f448 100644
+--- a/src/mn.c
++++ b/src/mn.c
+@@ -1478,7 +1478,7 @@ static struct home_addr_info *hai_copy(struct home_addr_info *conf_hai)
+ if (hai != NULL) {
+ pthread_mutexattr_t mattrs;
+ pthread_mutexattr_init(&mattrs);
+- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+
+ memcpy(hai, conf_hai, sizeof(struct home_addr_info));
+
+diff --git a/src/movement.c b/src/movement.c
+index d985937..6400448 100644
+--- a/src/movement.c
++++ b/src/movement.c
+@@ -2013,7 +2013,7 @@ int md_init(void)
+ int val;
+
+ pthread_mutexattr_init(&mattrs);
+- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ if (pthread_mutex_init(&iface_lock, &mattrs))
+ return -1;
+
+diff --git a/src/mpdisc_ha.c b/src/mpdisc_ha.c
+index 40ba05f..fd7a90d 100644
+--- a/src/mpdisc_ha.c
++++ b/src/mpdisc_ha.c
+@@ -559,7 +559,7 @@ int mpd_ha_init(void)
+ {
+ pthread_mutexattr_t mattrs;
+ pthread_mutexattr_init(&mattrs);
+- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ if (pthread_mutex_init(&mpa_lock, &mattrs) ||
+ pthread_rwlock_init(&prefix_lock, NULL) ||
+ hash_init(&mpa_hash, DOUBLE_ADDR, MPA_BUCKETS) < 0)
+diff --git a/src/mpdisc_mn.c b/src/mpdisc_mn.c
+index 4873bd6..ada02bd 100644
+--- a/src/mpdisc_mn.c
++++ b/src/mpdisc_mn.c
+@@ -267,7 +267,7 @@ int mpd_mn_init(void)
+ {
+ pthread_mutexattr_t mattrs;
+ pthread_mutexattr_init(&mattrs);
+- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ if (pthread_mutex_init(&mps_lock, &mattrs))
+ return -1;
+ if (hash_init(&mps_hash, DOUBLE_ADDR, MPS_BUCKETS) < 0)
+diff --git a/src/tqueue.c b/src/tqueue.c
+index 2f7aa0b..9c185b8 100644
+--- a/src/tqueue.c
++++ b/src/tqueue.c
+@@ -65,7 +65,7 @@ int taskqueue_init(void)
+ {
+ pthread_mutexattr_t mattrs;
+ pthread_mutexattr_init(&mattrs);
+- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ if (pthread_mutex_init(&mutex, &mattrs) ||
+ pthread_cond_init(&cond, NULL) ||
+ pthread_create(&tq_runner, NULL, runner, NULL))
+diff --git a/src/tunnelctl.c b/src/tunnelctl.c
+index 23fc20b..813b8ec 100644
+--- a/src/tunnelctl.c
++++ b/src/tunnelctl.c
+@@ -433,7 +433,7 @@ int tunnelctl_init(void)
+ return -1;
+
+ pthread_mutexattr_init(&mattrs);
+- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP);
++ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL);
+ if (pthread_mutex_init(&tnl_lock, &mattrs))
+ return -1;
+
+--
+2.16.2
+
diff --git a/meta-networking/recipes-connectivity/umip/umip/add-dependency-to-support-parallel-compilation.patch b/meta-networking/recipes-connectivity/umip/umip/add-dependency-to-support-parallel-compilation.patch
new file mode 100644
index 0000000000..dbf0082640
--- /dev/null
+++ b/meta-networking/recipes-connectivity/umip/umip/add-dependency-to-support-parallel-compilation.patch
@@ -0,0 +1,23 @@
+When "make -j10", the compilation will fail,
+because scan.c has included gram.h, but gram.h was produced
+after scan.c was compiled
+
+So add this dependency to ensure that gram.h is produced
+before scan.c is produced.
+
+Upstream-Status: Inappropriate [upstream is not active]
+
+Signed-off-by: Roy.Li <RongQing.Li@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ src/Makefile.am | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -81,3 +81,5 @@ CLEANFILES = gram.c gram.h \
+
+ DISTCLEANFILES = $(BUILT_SOURCES)
+ MAINTAINERCLEANFILES = Makefile.in
++
++scan.c: gram.h
diff --git a/meta-networking/recipes-connectivity/umip/umip/mip6d b/meta-networking/recipes-connectivity/umip/umip/mip6d
new file mode 100755
index 0000000000..ebd70a6cca
--- /dev/null
+++ b/meta-networking/recipes-connectivity/umip/umip/mip6d
@@ -0,0 +1,112 @@
+#!/bin/sh
+#
+# mip6d Start script for the Mobile IPv6 daemon
+#
+# chkconfig: - 55 25
+# description: The mobile IPv6 daemon allows nodes to remain \
+# reachable while moving around in the IPv6 Internet.
+# processname: mip6d
+# config: /etc/mip6d.conf
+# config: /etc/sysconfig/mip6d
+#
+### BEGIN INIT INFO
+# Provides: mipv6-daemon
+# Required-Start: $local_fs $remote_fs $network $named
+# Required-Stop: $local_fs $remote_fs $network
+# Should-Start: $syslog
+# Should-Stop: $network $syslog
+# Default-Start:
+# Default-Stop: 0 1 6
+# Short-Description: Start and stop Mobile IPV6 daemon
+# Description: The mobile IPv6 daemon allows nodes to remain
+# reachable while moving around in the IPv6 Internet.
+### END INIT INFO
+
+# Source function library.
+. /etc/init.d/functions
+
+if [ -f /etc/sysconfig/mip6d ]; then
+ . /etc/sysconfig/mip6d
+fi
+
+mip6d=/usr/sbin/mip6d
+prog="mip6d"
+lockfile=/var/lock/subsys/$prog
+
+start() {
+ [ -x $mip6d ] || exit 5
+ echo -n $"Starting $prog: "
+ start-stop-daemon -S -x ${mip6d} && success || failure
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && touch ${lockfile}
+ return $retval
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ start-stop-daemon -K -x $mip6d
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f ${lockfile}
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload()
+{
+ echo -n $"Reloading $prog configuration: "
+ killproc $mip6d -HUP
+ retval=$?
+ echo
+ return $retval
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ status $prog
+}
+
+rh_status_q() {
+ rh_status > /dev/null 2>&1
+}
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $prog {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+
+exit $?
diff --git a/meta-networking/recipes-connectivity/umip/umip/mip6d.service b/meta-networking/recipes-connectivity/umip/umip/mip6d.service
new file mode 100644
index 0000000000..2b5a5b9f1d
--- /dev/null
+++ b/meta-networking/recipes-connectivity/umip/umip/mip6d.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=MIPL Mobile IPv6
+After=network.target
+
+[Service]
+EnvironmentFile=-@SYSCONFDIR@/sysconfig/mip6d
+ExecStart=@SBINDIR@/mip6d $ARGS
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-networking/recipes-connectivity/umip_1.0.bb b/meta-networking/recipes-connectivity/umip/umip_1.0.bb
index e2abc02ce7..e2abc02ce7 100644
--- a/meta-networking/recipes-connectivity/umip_1.0.bb
+++ b/meta-networking/recipes-connectivity/umip/umip_1.0.bb