Merge pull request #1700 from aTanW/master
authorSteven Barth <steven@midlink.org>
Wed, 26 Aug 2015 07:20:31 +0000 (09:20 +0200)
committerSteven Barth <steven@midlink.org>
Wed, 26 Aug 2015 07:20:31 +0000 (09:20 +0200)
gammu: bump to mainstream v 1.36.4, full-language version build fix

58 files changed:
admin/zabbix/Makefile
admin/zabbix/patches/015-daemon-foreground.patch
lang/php5/Makefile
lang/python-ldap/Makefile [new file with mode: 0644]
lang/python-ldap/patches/010-setup_cfg.patch [new file with mode: 0644]
lang/python-pip/Makefile
lang/python-setuptools/Makefile
lang/python/Makefile
libs/hidapi/Makefile
libs/libsigc++/Makefile
libs/libuv/Makefile
libs/unixodbc/Makefile
net/haproxy/Makefile
net/haproxy/patches/0001-BUG-MINOR-log-missing-some-ARGC_-entries-in-fmt_dire.patch [new file with mode: 0644]
net/haproxy/patches/0002-DOC-usesrc-root-privileges-requirements.patch [new file with mode: 0644]
net/haproxy/patches/0003-BUILD-ssl-Allow-building-against-libssl-without-SSLv.patch [new file with mode: 0644]
net/haproxy/patches/0004-DOC-MINOR-fix-OpenBSD-versions-where-haproxy-works.patch [new file with mode: 0644]
net/memcached/Makefile
net/memcached/patches/001-musl-compat.patch [new file with mode: 0644]
net/mosquitto/Makefile
net/mosquitto/patches/001-free-counting-bug-475707.patch [new file with mode: 0644]
net/netperf/Makefile
net/reaver/Makefile [new file with mode: 0644]
net/reaver/patches/0001-wpscrack-big-endian-fixes.patch [new file with mode: 0644]
net/reaver/patches/0002-Use-the-current-directory-for-storing-and-loading-se.patch [new file with mode: 0644]
net/reaver/patches/0003-wash-wpsmon-use-less-useless-spaces-in-output-to-fit.patch [new file with mode: 0644]
net/reaver/patches/0100-Include-sys-types.h-for-definition-of-u_char.patch [new file with mode: 0644]
net/sqm-scripts/Makefile
net/strongswan/Makefile
net/xl2tpd/Makefile
net/xl2tpd/files/l2tp.sh
net/xl2tpd/patches/200-xl2tpd-control-check-end-of-file-when-reading-pipe-t.patch [deleted file]
net/xl2tpd/patches/201-xl2tpd-control-define-_GNU_SOURCE-to-use-fmemopen-an.patch [deleted file]
net/xl2tpd/patches/202-xl2tpd-control-open-control-file-with-O_NONBLOCK.patch [deleted file]
net/xl2tpd/patches/203-xl2tpd-control-cleaup-result-file-atexit.patch [deleted file]
net/xl2tpd/patches/204-xl2tpd-control-enhance-output-of-print_error.patch [deleted file]
net/xl2tpd/patches/205-xl2tpd-fix-typo-in-reporting-available-lns-count.patch [deleted file]
net/xl2tpd/patches/206-xl2tpd-start_pppd-place-opts-after-plugin-pppol2tp.s.patch [deleted file]
net/xl2tpd/patches/207-xl2tpd-introduce-new-option-l-for-using-syslog-as-th.patch [deleted file]
net/xl2tpd/patches/208-xl2tpd-unlink-result-file-to-prevent-leftover-a-regu.patch [deleted file]
net/xl2tpd/patches/209-xl2tpd-ignore-SIGPIPE-signal.patch [deleted file]
net/xl2tpd/patches/210-xl2tpd-control-show-all-available-commands-in-help.patch [deleted file]
sound/mpd/Makefile
utils/acpid/Makefile
utils/acpid/patches/001-musl-compat.patch [deleted file]
utils/bash/Makefile
utils/bash/patches/140-upstream-bash43-040.patch [new file with mode: 0644]
utils/bash/patches/141-upstream-bash43-041.patch [new file with mode: 0644]
utils/bash/patches/142-upstream-bash43-042.patch [new file with mode: 0644]
utils/crelay/Makefile
utils/crelay/files/crelay.init
utils/crelay/patches/010-link_with_ftdi1.patch
utils/crelay/patches/020-link_using_LDFLAGS.patch [new file with mode: 0644]
utils/dbus/Makefile
utils/lsof/Makefile
utils/lsof/patches/003-lsof_selinux.patch
utils/lsof/patches/004-lsof_ccv.patch
utils/rtklib/Makefile

index 02e142164f8d0f32b9a78aad534f6fa6975b7a5c..098f3e3414efac3d427b761a021a51f30dadee8c 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zabbix
-PKG_VERSION:=2.4.5
-PKG_RELEASE:=3
+PKG_VERSION:=2.4.6
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/zabbix
-PKG_MD5SUM:=a82eb0d55d3ca947e10a4a55238f4388
+PKG_MD5SUM:=06ad8d5808a0eddf2b9f0a256b6a5fde
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
index 20e13060e9d022c38e42db9c4c9c6d63e0a9bf4f..364e70360492959da1e7b2009cb84b48587eff49 100644 (file)
@@ -1,8 +1,8 @@
 --- a/include/common.h
 +++ b/include/common.h
-@@ -1081,4 +1081,7 @@ int      parse_serveractive_element(char *str
- #define ZBX_SESSION_ACTIVE    0
- #define ZBX_SESSION_PASSIVE   1
+@@ -1083,4 +1083,7 @@ int      parse_serveractive_element(char *str
+ char  *zbx_dyn_escape_shell_single_quote(const char *text);
  
 +#define ZBX_RUN_BACKGROUND      0
 +#define ZBX_RUN_FOREGROUND      1
index dee218c5a0770bcf16342805d6df244c87e6a3da..0be18c68442fdc7f5949b3a39df576676e9b3359 100644 (file)
@@ -11,7 +11,7 @@ PKG_NAME:=php
 PKG_VERSION:=5.6.12
 PKG_RELEASE:=1
 
-PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>, Michael Heimpold <mhei@heimpold.de>
 
 PKG_LICENSE:=PHPv3.01
 PKG_LICENSE_FILES:=LICENSE
@@ -55,7 +55,6 @@ define Package/php5/Default
   CATEGORY:=Languages
   TITLE:=PHP5 Hypertext preprocessor
   URL:=http://www.php.net/
-  MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
   DEPENDS:=php5
 endef
 
diff --git a/lang/python-ldap/Makefile b/lang/python-ldap/Makefile
new file mode 100644 (file)
index 0000000..7b57557
--- /dev/null
@@ -0,0 +1,59 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-ldap
+PKG_VERSION:=2.4.20
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dmitry Trefilov <the-alien@live.ru>
+PKG_LICENSE:=Python-style
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/p/$(PKG_NAME)
+PKG_MD5SUM:=f98ecd0581766a43954ba0f218053032
+
+PKG_BUILD_DEPENDS:=python libopenldap
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/python-ldap
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  DEPENDS:=+libopenldap +python
+  TITLE:=Python modules for implementing LDAP clients
+  URL:=http://python-ldap.org/
+endef
+
+define Package/python-ldap/description
+  python-ldap provides an object-oriented API to access LDAP directory
+  servers from Python programs. Mainly it wraps the OpenLDAP 2.x libs
+  for that purpose. Additionally the package contains modules for
+  other LDAP-related stuff (e.g. processing LDIF, LDAPURLs, LDAPv3
+  schema, LDAPv3 extended operations and controls, etc.).
+endef
+
+define Build/Compile
+       $(call Build/Compile/PyMod,,build_ext \
+               --include-dirs="$(STAGING_DIR)/usr/include:$(STAGING_DIR)/usr/include/sasl" \
+               --library-dirs="$(STAGING_DIR)/usr/lib:$(STAGING_DIR)/usr/lib/sasl2" \
+       build_py \
+       install --prefix="$(PKG_INSTALL_DIR)/usr")
+endef
+
+define PyPackage/python-ldap/install
+       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+       $(CP) \
+           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+           $(1)$(PYTHON_PKG_DIR)
+endef
+
+$(eval $(call PyPackage,python-ldap))
+$(eval $(call BuildPackage,python-ldap))
diff --git a/lang/python-ldap/patches/010-setup_cfg.patch b/lang/python-ldap/patches/010-setup_cfg.patch
new file mode 100644 (file)
index 0000000..372e9d2
--- /dev/null
@@ -0,0 +1,16 @@
+From: Dmitrij Trefilov <the-alien@live.ru>
+
+Subject: [PATCH] lang: removed hardcoded include and library directories from setup.cfg
+Signed-off-by: Dmitrij Trefilov <the-alien@live.ru>
+---
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -1,6 +1,6 @@
+ [_ldap]
+-library_dirs = /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64
+-include_dirs = /usr/include /usr/include/sasl /usr/local/include /usr/local/include/sasl
++library_dirs = 
++include_dirs = 
+ defines = HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
+ extra_compile_args = 
+ extra_objects = 
index 151a2af352477eb479bb635519f62a074a36f544..1d20ca92e6d24c123c7ec6f7295356c1bbd4b10d 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pip
-PKG_VERSION:=7.1.0
-PKG_RELEASE:=2
+PKG_VERSION:=7.1.2
+PKG_RELEASE:=1
 
 PKG_SOURCE:=pip-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://pypi.python.org/packages/source/p/pip/
-PKG_MD5SUM:=d935ee9146074b1d3f26c5f0acfd120e
+PKG_MD5SUM:=3823d2343d9f3aaab21cf9c917710196
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/pip-$(PKG_VERSION)
 PKG_USE_MIPS16:=0
index 1b10e9da25235b5fda1c384dc2a6b629fee14836..95e5d7ffa52b647447a7aa3f3d8cd754653a6a4e 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-setuptools
-PKG_VERSION:=18.1
+PKG_VERSION:=18.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=setuptools-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://pypi.python.org/packages/source/s/setuptools/
-PKG_MD5SUM:=f72e87f34fbf07f299f6cb46256a0b06
+PKG_MD5SUM:=52b4e48939ef311d7204f8fe940764f4
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/setuptools-$(PKG_VERSION)
 
index 935fc3960ea85ba527652efcce09642d0e646888..8cd41af02e905910a2bd9f33e8b848d5233cfd01 100644 (file)
@@ -28,7 +28,7 @@ HOST_BUILD_PARALLEL:=1
 PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION)
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION)
 
-PKG_BUILD_DEPENDS:=python/host
+PKG_BUILD_DEPENDS:=libbz2/host python/host
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
index efdbbf5168eb8b162ef7149c510216de31626f09..e8ef7335941a5236417ff8706aad0a72826c6fab 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hidapi
 PKG_VERSION:=0.8.0-rc1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/signal11/hidapi.git
@@ -27,7 +27,7 @@ include $(INCLUDE_DIR)/nls.mk
 define Package/hidapi
   SECTION:=libs
   CATEGORY:=Libraries
-  DEPENDS:=+libusb-1.0 +libiconv +librt
+  DEPENDS:=+libusb-1.0 +librt $(ICONV_DEPENDS)
   TITLE:=Library to talk to HID devices
   URL:=http://www.signal11.us/oss/hidapi/
 endef
index fbb0a56101f18dcc73ff3e68d8581a61f11bb685..3b1ff78c373fba70de8604d3927111be61a65533 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libsigc++
-PKG_VERSION:=2.4.1
+PKG_VERSION:=2.5.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=@GNOME/libsigc++/2.4
-PKG_MD5SUM:=55945ba6e1652f89999e910f6b52047c
+PKG_SOURCE_URL:=@GNOME/libsigc++/2.5
+PKG_MD5SUM:=dfa12d53e4603504701866c256df84eb
 PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
 PKG_LICENSE:=LGPL-2.1
 
index da1ac326dcbb2cca45bab5be105e97273d2469a0..336c3ee287a49ff458101a368fb931ca70567511 100644 (file)
@@ -16,7 +16,7 @@ PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
 
 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://libuv.org/dist/v$(PKG_VERSION)/
+PKG_SOURCE_URL:=http://dist.libuv.org/dist/v$(PKG_VERSION)/
 PKG_MD5SUM:=51cfa3d8adc05852982e3c742ec3c039
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
index eeb6fc96bc63b7c2699d257f98ef4d9b77ed0ad8..47a88fbc66495de945cd2c8df04b58d1d35bd4ac 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=unixodbc
-PKG_VERSION:=2.3.2
+PKG_VERSION:=2.3.3
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=@SF/unixodbc
 PKG_SOURCE:=unixODBC-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=5e4528851eda5d3d4aed249b669bd05b
+PKG_MD5SUM:=09bf65123905b951af192854d70eeae8
 PKG_BUILD_DIR:=$(BUILD_DIR)/unixODBC-$(PKG_VERSION)
 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
 PKG_LICENSE:=prog GPL libs LGPL
index 6ac8a3a634897dfe0cf531ae4e2ee96e47ec7891..40d6411415ce45f055dde0bed3e6fa5624ede3c7 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=haproxy
 PKG_VERSION:=1.5.14
-PKG_RELEASE:=00
+PKG_RELEASE:=04
 PKG_SOURCE:=haproxy-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://haproxy.1wt.eu/download/1.5/src/
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
diff --git a/net/haproxy/patches/0001-BUG-MINOR-log-missing-some-ARGC_-entries-in-fmt_dire.patch b/net/haproxy/patches/0001-BUG-MINOR-log-missing-some-ARGC_-entries-in-fmt_dire.patch
new file mode 100644 (file)
index 0000000..72db452
--- /dev/null
@@ -0,0 +1,64 @@
+From df0a5960987b3cb663dcfa93d29c21acc13cd3e3 Mon Sep 17 00:00:00 2001
+From: Willy Tarreau <w@1wt.eu>
+Date: Thu, 9 Jul 2015 11:20:00 +0200
+Subject: [PATCH 1/4] BUG/MINOR: log: missing some ARGC_* entries in
+ fmt_directives()
+
+ARGC_CAP was not added to fmt_directives() which is used to format
+error messages when failing to parse log format expressions. The
+whole switch/case has been reorganized to match the declaration
+order making it easier to spot missing values. The default is not
+the "log" directive anymore but "undefined" asking to report the
+bug.
+
+Backport to 1.5 is not strictly needed but is desirable at least
+for code sanity.
+(cherry picked from commit 53e1a6d31743b1bef6063ff30b812521391ae3c3)
+---
+ src/log.c | 24 ++++++++++++++----------
+ 1 file changed, 14 insertions(+), 10 deletions(-)
+
+diff --git a/src/log.c b/src/log.c
+index 1a5ad25..f0a3072 100644
+--- a/src/log.c
++++ b/src/log.c
+@@ -167,22 +167,26 @@ struct logformat_var_args var_args_list[] = {
+ static inline const char *fmt_directive(const struct proxy *curproxy)
+ {
+       switch (curproxy->conf.args.ctx) {
+-      case ARGC_UIF:
+-              return "unique-id-format";
++      case ARGC_ACL:
++              return "acl";
++      case ARGC_STK:
++              return "stick";
++      case ARGC_TRK:
++              return "track-sc";
++      case ARGC_LOG:
++              return "log-format";
+       case ARGC_HRQ:
+               return "http-request";
+       case ARGC_HRS:
+               return "http-response";
+-      case ARGC_STK:
+-              return "stick";
+-      case ARGC_TRK:
+-              return "track-sc"; break;
++      case ARGC_UIF:
++              return "unique-id-format";
+       case ARGC_RDR:
+-              return "redirect"; break;
+-      case ARGC_ACL:
+-              return "acl"; break;
++              return "redirect";
++      case ARGC_CAP:
++              return "capture";
+       default:
+-              return "log-format";
++              return "undefined(please report this bug)"; /* must never happen */
+       }
+ }
+-- 
+2.3.6
+
diff --git a/net/haproxy/patches/0002-DOC-usesrc-root-privileges-requirements.patch b/net/haproxy/patches/0002-DOC-usesrc-root-privileges-requirements.patch
new file mode 100644 (file)
index 0000000..0af6565
--- /dev/null
@@ -0,0 +1,27 @@
+From ea31f225c2c93a25b8bef7a9241a89cecfd9d350 Mon Sep 17 00:00:00 2001
+From: Baptiste Assmann <bedis9@gmail.com>
+Date: Fri, 17 Jul 2015 21:59:42 +0200
+Subject: [PATCH 2/4] DOC: usesrc root privileges requirements
+
+The "usesrc" parameter of the source statement requires root privileges.
+(cherry picked from commit 91bd337d90cb347feda34b01402f3471c8a4833c)
+---
+ doc/configuration.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/doc/configuration.txt b/doc/configuration.txt
+index 6714afb..64697a4 100644
+--- a/doc/configuration.txt
++++ b/doc/configuration.txt
+@@ -6117,6 +6117,8 @@ source <addr>[:<port>] [interface <name>]
+   is possible at the server level using the "source" server option. Refer to
+   section 5 for more information.
++  In order to work, "usesrc" requires root privileges.
++
+   Examples :
+         backend private
+             # Connect to the servers using our 192.168.1.200 source address
+-- 
+2.3.6
+
diff --git a/net/haproxy/patches/0003-BUILD-ssl-Allow-building-against-libssl-without-SSLv.patch b/net/haproxy/patches/0003-BUILD-ssl-Allow-building-against-libssl-without-SSLv.patch
new file mode 100644 (file)
index 0000000..074cedc
--- /dev/null
@@ -0,0 +1,51 @@
+From eee374c28ea8ea22834ff14515b5584bc3e0c7b5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Courr=C3=A8ges-Anglas?= <jca@wxcvbn.org>
+Date: Sat, 25 Jul 2015 16:50:52 -0600
+Subject: [PATCH 3/4] BUILD: ssl: Allow building against libssl without SSLv3.
+
+If SSLv3 is explicitely requested but not available, warn the user and
+bail out.
+(cherry picked from commit 17c3f6284cf605e47f6525c077bc644c45272849)
+---
+ src/ssl_sock.c | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/src/ssl_sock.c b/src/ssl_sock.c
+index 7d77d36..2ae45ec 100644
+--- a/src/ssl_sock.c
++++ b/src/ssl_sock.c
+@@ -1405,8 +1405,14 @@ int ssl_sock_prepare_ctx(struct bind_conf *bind_conf, SSL_CTX *ctx, struct proxy
+               ssloptions |= SSL_OP_NO_TLSv1_2;
+       if (bind_conf->ssl_options & BC_SSL_O_NO_TLS_TICKETS)
+               ssloptions |= SSL_OP_NO_TICKET;
+-      if (bind_conf->ssl_options & BC_SSL_O_USE_SSLV3)
++      if (bind_conf->ssl_options & BC_SSL_O_USE_SSLV3) {
++#ifndef OPENSSL_NO_SSL3
+               SSL_CTX_set_ssl_version(ctx, SSLv3_server_method());
++#else
++              Alert("SSLv3 support requested but unavailable.\n");
++              cfgerr++;
++#endif
++      }
+       if (bind_conf->ssl_options & BC_SSL_O_USE_TLSV10)
+               SSL_CTX_set_ssl_version(ctx, TLSv1_server_method());
+ #if SSL_OP_NO_TLSv1_1
+@@ -1750,8 +1756,14 @@ int ssl_sock_prepare_srv_ctx(struct server *srv, struct proxy *curproxy)
+               options |= SSL_OP_NO_TLSv1_2;
+       if (srv->ssl_ctx.options & SRV_SSL_O_NO_TLS_TICKETS)
+               options |= SSL_OP_NO_TICKET;
+-      if (srv->ssl_ctx.options & SRV_SSL_O_USE_SSLV3)
++      if (srv->ssl_ctx.options & SRV_SSL_O_USE_SSLV3) {
++#ifndef OPENSSL_NO_SSL3
+               SSL_CTX_set_ssl_version(srv->ssl_ctx.ctx, SSLv3_client_method());
++#else
++              Alert("SSLv3 support requested but unavailable.");
++              cfgerr++;
++#endif
++      }
+       if (srv->ssl_ctx.options & SRV_SSL_O_USE_TLSV10)
+               SSL_CTX_set_ssl_version(srv->ssl_ctx.ctx, TLSv1_client_method());
+ #if SSL_OP_NO_TLSv1_1
+-- 
+2.3.6
+
diff --git a/net/haproxy/patches/0004-DOC-MINOR-fix-OpenBSD-versions-where-haproxy-works.patch b/net/haproxy/patches/0004-DOC-MINOR-fix-OpenBSD-versions-where-haproxy-works.patch
new file mode 100644 (file)
index 0000000..c769228
--- /dev/null
@@ -0,0 +1,26 @@
+From e4766ba031e1fea8f2ca139316dc4e8209e960c2 Mon Sep 17 00:00:00 2001
+From: Daniel Jakots <vigdis@chown.me>
+Date: Wed, 29 Jul 2015 08:03:08 +0200
+Subject: [PATCH 4/4] DOC/MINOR: fix OpenBSD versions where haproxy works
+
+(cherry picked from commit 17d228be14762b282e5262262c45ecee4c265552)
+---
+ README | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/README b/README
+index add7f06..e267730 100644
+--- a/README
++++ b/README
+@@ -39,7 +39,7 @@ and assign it to the TARGET variable :
+   - solaris     for Solaris 8 or 10 (others untested)
+   - freebsd     for FreeBSD 5 to 10 (others untested)
+   - osx         for Mac OS/X
+-  - openbsd     for OpenBSD 3.1 to 5.2 (others untested)
++  - openbsd     for OpenBSD 3.1 and above
+   - aix51       for AIX 5.1
+   - aix52       for AIX 5.2
+   - cygwin      for Cygwin
+-- 
+2.3.6
+
index 111b14d57ef7cf598ff4ad28366150325dfea721..211cfe054d47152964828a7b70ae5bdb8d6b3b25 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=memcached
 PKG_VERSION:=1.4.24
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://memcached.org/files
@@ -24,7 +24,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/memcached
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+libevent +libpthread
+  DEPENDS:=+libevent2 +libpthread
   TITLE:=The high-performance, distributed memory object caching system
   URL:=http://memcached.org/
 endef
diff --git a/net/memcached/patches/001-musl-compat.patch b/net/memcached/patches/001-musl-compat.patch
new file mode 100644 (file)
index 0000000..558931e
--- /dev/null
@@ -0,0 +1,47 @@
+--- memcached-1.4.15.orig/assoc.c
++++ memcached-1.4.15/assoc.c
+@@ -14,8 +14,8 @@
+ #include "memcached.h"
+ #include <sys/stat.h>
+ #include <sys/socket.h>
+-#include <sys/signal.h>
+ #include <sys/resource.h>
++#include <signal.h>
+ #include <fcntl.h>
+ #include <netinet/in.h>
+ #include <errno.h>
+--- memcached-1.4.15.orig/items.c
++++ memcached-1.4.15/items.c
+@@ -2,13 +2,13 @@
+ #include "memcached.h"
+ #include <sys/stat.h>
+ #include <sys/socket.h>
+-#include <sys/signal.h>
+ #include <sys/resource.h>
+ #include <fcntl.h>
+ #include <netinet/in.h>
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <signal.h>
+ #include <string.h>
+ #include <time.h>
+ #include <assert.h>
+--- memcached-1.4.15.orig/slabs.c
++++ memcached-1.4.15/slabs.c
+@@ -10,7 +10,6 @@
+ #include "memcached.h"
+ #include <sys/stat.h>
+ #include <sys/socket.h>
+-#include <sys/signal.h>
+ #include <sys/resource.h>
+ #include <fcntl.h>
+ #include <netinet/in.h>
+@@ -18,6 +17,7 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
++#include <signal.h>
+ #include <assert.h>
+ #include <pthread.h>
index 7ad3bc8cef72f564b202b66465e61eb6800bd81f..1aac9d8723351d8a96e087054c0a6715ded4c5b8 100644 (file)
@@ -9,14 +9,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mosquitto
-PKG_VERSION:=1.4.2
+PKG_VERSION:=1.4.3
 PKG_RELEASE:=2
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE.txt
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://mosquitto.org/files/source/
-PKG_MD5SUM:=2c3b19686c04849ed4b183c63149bfe1
+PKG_MD5SUM:=1c1c750525546bc13d8d72e56a0742a7
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
diff --git a/net/mosquitto/patches/001-free-counting-bug-475707.patch b/net/mosquitto/patches/001-free-counting-bug-475707.patch
new file mode 100644 (file)
index 0000000..6b16145
--- /dev/null
@@ -0,0 +1,14 @@
+diff --git a/lib/memory_mosq.c b/lib/memory_mosq.c
+index b1f5bfd..4d8217d 100644
+--- a/lib/memory_mosq.c
++++ b/lib/memory_mosq.c
+@@ -54,6 +54,9 @@ void *mosquitto__calloc(size_t nmemb, size_t size)
+ void mosquitto__free(void *mem)
+ {
+ #ifdef REAL_WITH_MEMORY_TRACKING
++      if(!mem){
++              return;
++      }
+       memcount -= malloc_usable_size(mem);
+ #endif
+       free(mem);
index fd824ba7cf49d1699c6f0f8eca39b5712787d0ce..f50b7e8ddb61ecec4abae5c9781c813a6e439014 100644 (file)
@@ -26,6 +26,8 @@ define Package/netperf
   MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
 endef
 
+TARGET_CFLAGS+=-std=gnu89
+
 CONFIGURE_ARGS += --enable-demo
 
 define Package/netperf/install
diff --git a/net/reaver/Makefile b/net/reaver/Makefile
new file mode 100644 (file)
index 0000000..6d05d8b
--- /dev/null
@@ -0,0 +1,55 @@
+#
+# Copyright (C) 2012-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=reaver
+PKG_REV:=113
+PKG_VERSION:=r$(PKG_REV)
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://reaver-wps.googlecode.com/svn/trunk
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_SOURCE_PROTO:=svn
+PKG_LICENSE:=GPL-2.0
+
+PKG_AUTOMAKE_PATHS:=src
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+CONFIGURE_PATH:=src
+MAKE_PATH:=src
+
+define Package/reaver
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=wireless
+  TITLE:=Efficient brute force attack against Wifi Protected Setup
+  URL:=https://code.google.com/p/reaver-wps/
+  DEPENDS:=+libpcap +libsqlite3
+endef
+
+define Package/reaver/description
+  Reaver targets the external registrar functionality mandated by the WiFi
+  Protected Setup specification.
+  Access points will provide authenticated registrars with their current
+  wireless configuration (including the WPA PSK), and also accept a new
+  configuration from the registrar.
+endef
+
+define Package/reaver/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/{reaver,wash} $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/etc/reaver
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/reaver.db $(1)/etc/reaver/
+endef
+
+$(eval $(call BuildPackage,reaver))
diff --git a/net/reaver/patches/0001-wpscrack-big-endian-fixes.patch b/net/reaver/patches/0001-wpscrack-big-endian-fixes.patch
new file mode 100644 (file)
index 0000000..da76c2e
--- /dev/null
@@ -0,0 +1,565 @@
+From 4e7af9f022996cb0a03b30f6af265b757807dfa2 Mon Sep 17 00:00:00 2001
+From: Paul Fertser <fercerpav@gmail.com>
+Date: Wed, 27 Jun 2012 17:44:55 +0400
+Subject: [PATCH 1/3] wpscrack: big-endian fixes
+
+This should fix access to the radiotap, 802.11, LLC/SNAP and WFA
+headers' fields. Run-time tested on an ar71xx BE system.
+
+Signed-off-by: Paul Fertser <fercerpav@gmail.com>
+---
+ src/80211.c    |   65 +++++++++++++++++++------------
+ src/builder.c  |   23 +++++------
+ src/defs.h     |  116 +++++++++++++++++++++++++++++++++++++++-----------------
+ src/exchange.c |   23 ++++++-----
+ src/wpsmon.c   |   13 ++++--
+ 5 files changed, 151 insertions(+), 89 deletions(-)
+
+diff --git a/src/80211.c b/src/80211.c
+index c2aff59..19f1e92 100644
+--- a/src/80211.c
++++ b/src/80211.c
+@@ -90,17 +90,19 @@ void read_ap_beacon()
+                 if(header.len >= MIN_BEACON_SIZE)
+                 {
+                         rt_header = (struct radio_tap_header *) radio_header(packet, header.len);
+-                        frame_header = (struct dot11_frame_header *) (packet + rt_header->len);
+-
++                      size_t rt_header_len = __le16_to_cpu(rt_header->len);
++                      frame_header = (struct dot11_frame_header *) (packet + rt_header_len);
++                      
+                       if(is_target(frame_header))
+                       {
+-                                if(frame_header->fc.type == MANAGEMENT_FRAME && frame_header->fc.sub_type == SUBTYPE_BEACON)
++                                if((frame_header->fc & __cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
++                                 __cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON))
+                                 {
+-                                              beacon = (struct beacon_management_frame *) (packet + rt_header->len + sizeof(struct dot11_frame_header));
++                                              beacon = (struct beacon_management_frame *) (packet + rt_header_len + sizeof(struct dot11_frame_header));
+                                               set_ap_capability(beacon->capability);
+                                       /* Obtain the SSID and channel number from the beacon packet */
+-                                      tag_offset = rt_header->len + sizeof(struct dot11_frame_header) + sizeof(struct beacon_management_frame);
++                                      tag_offset = rt_header_len + sizeof(struct dot11_frame_header) + sizeof(struct beacon_management_frame);
+                                       channel = parse_beacon_tags(packet, header.len);
+                                       
+                                       /* If no channel was manually specified, switch to the AP's current channel */
+@@ -135,29 +137,31 @@ int8_t signal_strength(const u_char *packet, size_t len)
+       {
+               header = (struct radio_tap_header *) packet;
+-              if((header->flags & SSI_FLAG) == SSI_FLAG)
++              uint32_t flags = __le32_to_cpu(header->flags);
++              
++              if((flags & SSI_FLAG) == SSI_FLAG)
+               {
+-                      if((header->flags & TSFT_FLAG) == TSFT_FLAG)
++                      if((flags & TSFT_FLAG) == TSFT_FLAG)
+                       {
+                               offset += TSFT_SIZE;
+                       }
+-                      if((header->flags & FLAGS_FLAG) == FLAGS_FLAG)
++                      if((flags & FLAGS_FLAG) == FLAGS_FLAG)
+                       {
+                               offset += FLAGS_SIZE;
+                       }
+       
+-                      if((header->flags & RATE_FLAG) == RATE_FLAG)
++                      if((flags & RATE_FLAG) == RATE_FLAG)
+                       {
+                               offset += RATE_SIZE;
+                       }
+-                      if((header->flags & CHANNEL_FLAG) == CHANNEL_FLAG)
++                      if((flags & CHANNEL_FLAG) == CHANNEL_FLAG)
+                       {
+                               offset += CHANNEL_SIZE;
+                       }
+-                      if((header->flags & FHSS_FLAG) == FHSS_FLAG)
++                      if((flags & FHSS_FLAG) == FHSS_FLAG)
+                       {
+                               offset += FHSS_FLAG;
+                       }
+@@ -196,11 +200,13 @@ int is_wps_locked()
+               if(header.len >= MIN_BEACON_SIZE)
+               {
+                       rt_header = (struct radio_tap_header *) radio_header(packet, header.len);
+-                      frame_header = (struct dot11_frame_header *) (packet + rt_header->len);
++                      size_t rt_header_len = __le16_to_cpu(rt_header->len);
++                      frame_header = (struct dot11_frame_header *) (packet + rt_header_len);
+                       if(memcmp(frame_header->addr3, get_bssid(), MAC_ADDR_LEN) == 0)
+                       {
+-                              if(frame_header->fc.type == MANAGEMENT_FRAME && frame_header->fc.sub_type == SUBTYPE_BEACON)
++                                if((frame_header->fc & __cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
++                                 __cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON))
+                               {
+                                       if(parse_wps_parameters(packet, header.len, &wps))
+                                       {
+@@ -411,24 +417,30 @@ int associate_recv_loop()
+                 if(header.len >= MIN_AUTH_SIZE)
+                 {
+                       rt_header = (struct radio_tap_header *) radio_header(packet, header.len);
+-                        dot11_frame = (struct dot11_frame_header *) (packet + rt_header->len);
++                      size_t rt_header_len = __le16_to_cpu(rt_header->len);
++                      dot11_frame = (struct dot11_frame_header *) (packet + rt_header_len);
+                         if((memcmp(dot11_frame->addr3, get_bssid(), MAC_ADDR_LEN) == 0) &&
+                            (memcmp(dot11_frame->addr1, get_mac(), MAC_ADDR_LEN) == 0))
+                         {
+-                              if(dot11_frame->fc.type == MANAGEMENT_FRAME)
++                                if((dot11_frame->fc & __cpu_to_le16(IEEE80211_FCTL_FTYPE)) ==
++                                 __cpu_to_le16(IEEE80211_FTYPE_MGMT))
+                               {
+-                                      auth_frame = (struct authentication_management_frame *) (packet + sizeof(struct dot11_frame_header) + rt_header->len);
+-                                      assoc_frame = (struct association_response_management_frame *) (packet + sizeof(struct dot11_frame_header) + rt_header->len);
++                                      auth_frame = (struct authentication_management_frame *) (packet + sizeof(struct dot11_frame_header) + rt_header_len);
++                                      assoc_frame = (struct association_response_management_frame *) (packet + sizeof(struct dot11_frame_header) + rt_header_len);
+                                       /* Did we get an authentication packet with a successful status? */
+-                                      if((dot11_frame->fc.sub_type == SUBTYPE_AUTHENTICATION) && (auth_frame->status == AUTHENTICATION_SUCCESS))
++                                      if((dot11_frame->fc & __cpu_to_le16(IEEE80211_FCTL_STYPE)) ==
++                                         __cpu_to_le16(IEEE80211_STYPE_AUTH)
++                                         && (auth_frame->status == __cpu_to_le16(AUTHENTICATION_SUCCESS)))
+                                               {
+                                                       ret_val = AUTH_OK;
+                                                       break;
+                                               }
+                                       /* Did we get an association packet with a successful status? */
+-                                              else if((dot11_frame->fc.sub_type == SUBTYPE_ASSOCIATION) && (assoc_frame->status == ASSOCIATION_SUCCESS))
++                                              else if((dot11_frame->fc & __cpu_to_le16(IEEE80211_FCTL_STYPE)) ==
++                                              __cpu_to_le16(IEEE80211_STYPE_ASSOC_RESP)
++                                              && (assoc_frame->status == __cpu_to_le16(ASSOCIATION_SUCCESS)))
+                                       {
+                                               ret_val = ASSOCIATE_OK;
+                                               break;
+@@ -455,13 +467,14 @@ enum encryption_type supported_encryption(const u_char *packet, size_t len)
+       if(len > MIN_BEACON_SIZE)
+       {
+               rt_header = (struct radio_tap_header *) radio_header(packet, len);
+-              beacon = (struct beacon_management_frame *) (packet + rt_header->len + sizeof(struct dot11_frame_header));
+-              offset = tag_offset = rt_header->len + sizeof(struct dot11_frame_header) + sizeof(struct beacon_management_frame);
++              size_t rt_header_len = __le16_to_cpu(rt_header->len);
++              beacon = (struct beacon_management_frame *) (packet + rt_header_len + sizeof(struct dot11_frame_header));
++              offset = tag_offset = rt_header_len + sizeof(struct dot11_frame_header) + sizeof(struct beacon_management_frame);
+               
+               tag_len = len - tag_offset;
+               tag_data = (const u_char *) (packet + tag_offset);
+-              if((beacon->capability & CAPABILITY_WEP) == CAPABILITY_WEP)
++              if((__le16_to_cpu(beacon->capability) & CAPABILITY_WEP) == CAPABILITY_WEP)
+               {
+                       enc = WEP;
+@@ -509,7 +522,7 @@ int parse_beacon_tags(const u_char *packet, size_t len)
+       struct radio_tap_header *rt_header = NULL;
+       rt_header = (struct radio_tap_header *) radio_header(packet, len);
+-      tag_offset = rt_header->len + sizeof(struct dot11_frame_header) + sizeof(struct beacon_management_frame);
++      tag_offset = __le16_to_cpu(rt_header->len) + sizeof(struct dot11_frame_header) + sizeof(struct beacon_management_frame);
+       if(tag_offset < len)
+       {
+@@ -548,7 +561,7 @@ int parse_beacon_tags(const u_char *packet, size_t len)
+               {
+                       if(ie_len  == 1)
+                       {
+-                              memcpy((int *) &channel, channel_data, ie_len);
++                              channel = *(uint8_t*)channel_data;
+                       }
+                       free(channel_data);
+               }
+@@ -603,13 +616,13 @@ int check_fcs(const u_char *packet, size_t len)
+       if(len > 4)
+       {
+               /* Get the packet's reported FCS (last 4 bytes of the packet) */
+-              memcpy((uint32_t *) &fcs, (packet + (len-4)), 4);
++              fcs = __le32_to_cpu(*(uint32_t*)(packet + (len-4)));
+               /* FCS is not calculated over the radio tap header */
+               if(has_rt_header())
+               {
+                       rt_header = (struct radio_tap_header *) packet;
+-                      offset += rt_header->len;
++                      offset += __le16_to_cpu(rt_header->len);
+               }
+               if(len > offset)
+diff --git a/src/builder.c b/src/builder.c
+index 37f2de7..6bf89e7 100644
+--- a/src/builder.c
++++ b/src/builder.c
+@@ -44,9 +44,8 @@ const void *build_radio_tap_header(size_t *len)
+               memset((void *) buf, 0, sizeof(struct radio_tap_header));
+               rt_header = (struct radio_tap_header *) buf;
+-              rt_header->len = sizeof(struct radio_tap_header);
+-      
+-              *len = rt_header->len;
++              *len = sizeof(struct radio_tap_header);
++              rt_header->len = __cpu_to_le16(*len);
+       }
+       
+       return buf;
+@@ -67,9 +66,9 @@ const void *build_dot11_frame_header(uint16_t fc, size_t *len)
+       
+               frag_seq += SEQ_MASK;
+-              header->duration = DEFAULT_DURATION;
+-              memcpy((void *) &header->fc, (void *) &fc, sizeof(struct frame_control));
+-              header->frag_seq = frag_seq;
++              header->duration = __cpu_to_le16(DEFAULT_DURATION);
++              header->fc = __cpu_to_le16(fc);
++              header->frag_seq = __cpu_to_le16(frag_seq);
+               memcpy((void *) header->addr1, get_bssid(), MAC_ADDR_LEN);
+               memcpy((void *) header->addr2, get_mac(), MAC_ADDR_LEN);
+@@ -91,8 +90,8 @@ const void *build_authentication_management_frame(size_t *len)
+               memset((void *) buf, 0, *len);
+               frame = (struct authentication_management_frame *) buf;
+-              frame->algorithm = OPEN_SYSTEM;
+-              frame->sequence = 1;
++              frame->algorithm = __cpu_to_le16(OPEN_SYSTEM);
++              frame->sequence = __cpu_to_le16(1);
+               frame->status = 0;
+       }
+       
+@@ -111,8 +110,8 @@ const void *build_association_management_frame(size_t *len)
+               memset((void *) buf, 0, *len);
+               frame = (struct association_request_management_frame *) buf;
+-              frame->capability = get_ap_capability();
+-              frame->listen_interval = LISTEN_INTERVAL;
++              frame->capability = __cpu_to_le16(get_ap_capability());
++              frame->listen_interval = __cpu_to_le16(LISTEN_INTERVAL);
+       }
+       return buf;
+@@ -133,7 +132,7 @@ const void *build_llc_header(size_t *len)
+               header->dsap = LLC_SNAP;
+               header->ssap = LLC_SNAP;
+               header->control_field = UNNUMBERED_FRAME;
+-              header->type = DOT1X_AUTHENTICATION;
++              header->type = __cpu_to_be16(DOT1X_AUTHENTICATION);
+       }
+@@ -279,7 +278,7 @@ const void *build_wfa_header(uint8_t op_code, size_t *len)
+               header = (struct wfa_expanded_header *) buf;
+       
+               memcpy(header->id, WFA_VENDOR_ID, sizeof(header->id));
+-              header->type = SIMPLE_CONFIG;
++              header->type = __cpu_to_be32(SIMPLE_CONFIG);
+               header->opcode = op_code;
+       }
+       
+diff --git a/src/defs.h b/src/defs.h
+index b2f45ea..0c628e7 100644
+--- a/src/defs.h
++++ b/src/defs.h
+@@ -41,6 +41,7 @@
+ #include <string.h>
+ #include <time.h>
+ #include <pcap.h>
++#include <asm/byteorder.h>
+ #include "wps.h"
+@@ -65,10 +66,10 @@
+ #define MANAGEMENT_FRAME      0x00
+ #define SUBTYPE_BEACON                0x08
+-#define DOT1X_AUTHENTICATION  0x8E88
++#define DOT1X_AUTHENTICATION  0x888E
+ #define DOT1X_EAP_PACKET      0x00
+-#define SIMPLE_CONFIG         0x01000000
++#define SIMPLE_CONFIG         0x00000001
+ #define P1_SIZE                       10000
+ #define P2_SIZE                       1000
+@@ -282,66 +283,111 @@ enum wfa_elements
+       WEP_TRANSMIT_KEY = 0x10064
+ };
++#define IEEE80211_FCTL_VERS           0x0003
++#define IEEE80211_FCTL_FTYPE          0x000c
++#define IEEE80211_FCTL_STYPE          0x00f0
++#define IEEE80211_FCTL_TODS           0x0100
++#define IEEE80211_FCTL_FROMDS         0x0200
++#define IEEE80211_FCTL_MOREFRAGS      0x0400
++#define IEEE80211_FCTL_RETRY          0x0800
++#define IEEE80211_FCTL_PM             0x1000
++#define IEEE80211_FCTL_MOREDATA               0x2000
++#define IEEE80211_FCTL_PROTECTED      0x4000
++#define IEEE80211_FCTL_ORDER          0x8000
++
++#define IEEE80211_SCTL_FRAG           0x000F
++#define IEEE80211_SCTL_SEQ            0xFFF0
++
++#define IEEE80211_FTYPE_MGMT          0x0000
++#define IEEE80211_FTYPE_CTL           0x0004
++#define IEEE80211_FTYPE_DATA          0x0008
++
++/* management */
++#define IEEE80211_STYPE_ASSOC_REQ     0x0000
++#define IEEE80211_STYPE_ASSOC_RESP    0x0010
++#define IEEE80211_STYPE_REASSOC_REQ   0x0020
++#define IEEE80211_STYPE_REASSOC_RESP  0x0030
++#define IEEE80211_STYPE_PROBE_REQ     0x0040
++#define IEEE80211_STYPE_PROBE_RESP    0x0050
++#define IEEE80211_STYPE_BEACON                0x0080
++#define IEEE80211_STYPE_ATIM          0x0090
++#define IEEE80211_STYPE_DISASSOC      0x00A0
++#define IEEE80211_STYPE_AUTH          0x00B0
++#define IEEE80211_STYPE_DEAUTH                0x00C0
++#define IEEE80211_STYPE_ACTION                0x00D0
++
++/* control */
++#define IEEE80211_STYPE_BACK_REQ      0x0080
++#define IEEE80211_STYPE_BACK          0x0090
++#define IEEE80211_STYPE_PSPOLL                0x00A0
++#define IEEE80211_STYPE_RTS           0x00B0
++#define IEEE80211_STYPE_CTS           0x00C0
++#define IEEE80211_STYPE_ACK           0x00D0
++#define IEEE80211_STYPE_CFEND         0x00E0
++#define IEEE80211_STYPE_CFENDACK      0x00F0
++
++/* data */
++#define IEEE80211_STYPE_DATA                  0x0000
++#define IEEE80211_STYPE_DATA_CFACK            0x0010
++#define IEEE80211_STYPE_DATA_CFPOLL           0x0020
++#define IEEE80211_STYPE_DATA_CFACKPOLL                0x0030
++#define IEEE80211_STYPE_NULLFUNC              0x0040
++#define IEEE80211_STYPE_CFACK                 0x0050
++#define IEEE80211_STYPE_CFPOLL                        0x0060
++#define IEEE80211_STYPE_CFACKPOLL             0x0070
++#define IEEE80211_STYPE_QOS_DATA              0x0080
++#define IEEE80211_STYPE_QOS_DATA_CFACK                0x0090
++#define IEEE80211_STYPE_QOS_DATA_CFPOLL               0x00A0
++#define IEEE80211_STYPE_QOS_DATA_CFACKPOLL    0x00B0
++#define IEEE80211_STYPE_QOS_NULLFUNC          0x00C0
++#define IEEE80211_STYPE_QOS_CFACK             0x00D0
++#define IEEE80211_STYPE_QOS_CFPOLL            0x00E0
++#define IEEE80211_STYPE_QOS_CFACKPOLL         0x00F0
++
+ #pragma pack(1)
+ struct radio_tap_header
+ {
+       uint8_t revision;       
+       uint8_t pad;
+-      uint16_t len;
+-      uint32_t flags;
+-};
+-
+-struct frame_control
+-{
+-        unsigned version : 2;
+-        unsigned type : 2;
+-        unsigned sub_type : 4;
+-
+-        unsigned to_ds : 1;
+-        unsigned from_ds : 1;
+-        unsigned more_frag : 1;
+-        unsigned retry : 1;
+-        unsigned pwr_mgt : 1;
+-        unsigned more_data : 1;
+-        unsigned protected_frame : 1;
+-        unsigned order : 1;
++      __le16 len;
++      __le32 flags;
+ };
+ struct dot11_frame_header
+ {
+-      struct frame_control fc;
+-        uint16_t duration;
++      __le16 fc;
++      __le16 duration;
+       unsigned char addr1[MAC_ADDR_LEN];
+       unsigned char addr2[MAC_ADDR_LEN];
+       unsigned char addr3[MAC_ADDR_LEN];
+-      uint16_t frag_seq;
++      __le16 frag_seq;
+ };
+ struct authentication_management_frame
+ {
+-      uint16_t algorithm;
+-      uint16_t sequence;
+-      uint16_t status;
++      __le16 algorithm;
++      __le16 sequence;
++      __le16 status;
+ };
+ struct association_request_management_frame
+ {
+-      uint16_t capability;
+-      uint16_t listen_interval;
++      __le16 capability;
++      __le16 listen_interval;
+ };
+ struct association_response_management_frame
+ {
+-      uint16_t capability;
+-      uint16_t status;
+-      uint16_t id;
++      __le16 capability;
++      __le16 status;
++      __le16 id;
+ };
+ struct beacon_management_frame
+ {
+       unsigned char timestamp[TIMESTAMP_LEN];
+-      uint16_t beacon_interval;
+-      uint16_t capability;
++      __le16 beacon_interval;
++      __le16 capability;
+ };
+ struct llc_header
+@@ -350,7 +396,7 @@ struct llc_header
+       uint8_t ssap;
+       uint8_t control_field;
+       unsigned char org_code[3];
+-      uint16_t type;
++      __be16 type;
+ };
+ struct dot1X_header
+@@ -371,7 +417,7 @@ struct eap_header
+ struct wfa_expanded_header
+ {
+       unsigned char id[3];
+-      uint32_t type;
++      __be32 type;
+       uint8_t opcode;
+       uint8_t flags;
+ };
+diff --git a/src/exchange.c b/src/exchange.c
+index 23c87e9..4f9a82b 100644
+--- a/src/exchange.c
++++ b/src/exchange.c
+@@ -306,26 +306,27 @@ enum wps_type process_packet(const u_char *packet, struct pcap_pkthdr *header)
+       /* Cast the radio tap and 802.11 frame headers and parse out the Frame Control field */
+       rt_header = (struct radio_tap_header *) packet;
+-      frame_header = (struct dot11_frame_header *) (packet+rt_header->len);
++      size_t rt_header_len = __le16_to_cpu(rt_header->len);
++      frame_header = (struct dot11_frame_header *) (packet+rt_header_len);
+       /* Does the BSSID/source address match our target BSSID? */
+       if(memcmp(frame_header->addr3, get_bssid(), MAC_ADDR_LEN) == 0)
+       {
+               /* Is this a data packet sent to our MAC address? */
+-              if(frame_header->fc.type == DATA_FRAME && 
+-                      frame_header->fc.sub_type == SUBTYPE_DATA && 
+-                      (memcmp(frame_header->addr1, get_mac(), MAC_ADDR_LEN) == 0)) 
++              if (((frame_header->fc & __cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
++                   __cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA)) &&
++                  (memcmp(frame_header->addr1, get_mac(), MAC_ADDR_LEN) == 0)) 
+               {
+                       llc = (struct llc_header *) (packet +
+-                                                      rt_header->len +
++                                                      rt_header_len +
+                                                       sizeof(struct dot11_frame_header)
+                       );
+                       /* All packets in our exchanges will be 802.1x */
+-                      if(llc->type == DOT1X_AUTHENTICATION)
++                      if(llc->type == __cpu_to_be16(DOT1X_AUTHENTICATION))
+                       {
+                               dot1x = (struct dot1X_header *) (packet +
+-                                                              rt_header->len +
++                                                              rt_header_len +
+                                                               sizeof(struct dot11_frame_header) +
+                                                               sizeof(struct llc_header)
+                               );
+@@ -334,7 +335,7 @@ enum wps_type process_packet(const u_char *packet, struct pcap_pkthdr *header)
+                               if(dot1x->type == DOT1X_EAP_PACKET && (header->len >= EAP_PACKET_SIZE))
+                               {
+                                       eap = (struct eap_header *) (packet +
+-                                                                      rt_header->len +
++                                                                      rt_header_len +
+                                                                       sizeof(struct dot11_frame_header) +
+                                                                       sizeof(struct llc_header) +
+                                                                       sizeof(struct dot1X_header)
+@@ -366,7 +367,7 @@ enum wps_type process_packet(const u_char *packet, struct pcap_pkthdr *header)
+                                               else if((eap->type == EAP_EXPANDED) && (header->len > WFA_PACKET_SIZE))
+                                               {
+                                                       wfa = (struct wfa_expanded_header *) (packet +
+-                                                                                      rt_header->len +
++                                                                                      rt_header_len +
+                                                                                       sizeof(struct dot11_frame_header) +
+                                                                                       sizeof(struct llc_header) +
+                                                                                       sizeof(struct dot1X_header) +
+@@ -374,14 +375,14 @@ enum wps_type process_packet(const u_char *packet, struct pcap_pkthdr *header)
+                                                       );
+                                               
+                                                       /* Verify that this is a WPS message */
+-                                                      if(wfa->type == SIMPLE_CONFIG)
++                                                      if(wfa->type == __cpu_to_be32(SIMPLE_CONFIG))
+                                                       {
+                                                               wps_msg_len =   (size_t) ntohs(eap->len) - 
+                                                                               sizeof(struct eap_header) - 
+                                                                               sizeof(struct wfa_expanded_header);
+                                                               wps_msg = (const void *) (packet +
+-                                                                                      rt_header->len +
++                                                                                      rt_header_len +
+                                                                                               sizeof(struct dot11_frame_header) +
+                                                                                               sizeof(struct llc_header) +
+                                                                                               sizeof(struct dot1X_header) +
+diff --git a/src/wpsmon.c b/src/wpsmon.c
+index d976924..22a394f 100644
+--- a/src/wpsmon.c
++++ b/src/wpsmon.c
+@@ -295,7 +295,8 @@ void parse_wps_settings(const u_char *packet, struct pcap_pkthdr *header, char *
+         }
+       rt_header = (struct radio_tap_header *) radio_header(packet, header->len);
+-      frame_header = (struct dot11_frame_header *) (packet + rt_header->len);
++      size_t rt_header_len = __le16_to_cpu(rt_header->len);
++      frame_header = (struct dot11_frame_header *) (packet + rt_header_len);
+       /* If a specific BSSID was specified, only parse packets from that BSSID */
+       if(!is_target(frame_header))
+@@ -323,15 +324,17 @@ void parse_wps_settings(const u_char *packet, struct pcap_pkthdr *header, char *
+                               channel_changed = 1;
+                       }
+-                      if(frame_header->fc.sub_type == PROBE_RESPONSE ||
+-                                   frame_header->fc.sub_type == SUBTYPE_BEACON)
++                      unsigned fsub_type = frame_header->fc & __cpu_to_le16(IEEE80211_FCTL_STYPE);
++
++                      if(fsub_type == __cpu_to_le16(IEEE80211_STYPE_PROBE_RESP) ||
++                         fsub_type == __cpu_to_le16(IEEE80211_STYPE_BEACON))
+                       {
+                               wps_parsed = parse_wps_parameters(packet, header->len, wps);
+                       }
+       
+                       if(!is_done(bssid) && (get_channel() == channel || source == PCAP_FILE))
+                       {
+-                              if(frame_header->fc.sub_type == SUBTYPE_BEACON && 
++                              if(fsub_type == __cpu_to_le16(IEEE80211_STYPE_BEACON) && 
+                                  mode == SCAN && 
+                                  !passive && 
+                                  should_probe(bssid))
+@@ -369,7 +372,7 @@ void parse_wps_settings(const u_char *packet, struct pcap_pkthdr *header, char *
+                                * If there was no WPS information, then the AP does not support WPS and we should ignore it from here on.
+                                * If this was a probe response, then we've gotten all WPS info we can get from this AP and should ignore it from here on.
+                                */
+-                              if(!wps_parsed || frame_header->fc.sub_type == PROBE_RESPONSE)
++                              if(!wps_parsed || fsub_type == __cpu_to_le16(IEEE80211_STYPE_PROBE_RESP))
+                               {
+                                       mark_ap_complete(bssid);
+                               }
+-- 
+1.7.7
+
diff --git a/net/reaver/patches/0002-Use-the-current-directory-for-storing-and-loading-se.patch b/net/reaver/patches/0002-Use-the-current-directory-for-storing-and-loading-se.patch
new file mode 100644 (file)
index 0000000..dd1bb42
--- /dev/null
@@ -0,0 +1,53 @@
+From cd444949f3176790101b8bdc9656831a03d8c01d Mon Sep 17 00:00:00 2001
+From: Paul Fertser <fercerpav@gmail.com>
+Date: Tue, 10 Jul 2012 11:13:29 +0400
+Subject: [PATCH 2/3] Use the current directory for storing and loading
+ sessions
+
+This allows the user to always explicitely choose (by changing the
+current directory before launching the program) where the session
+files should go. Useful e.g. to avoid hogging the precious space on
+embedded devices, just cd /tmp before starting the app.
+
+Signed-off-by: Paul Fertser <fercerpav@gmail.com>
+---
+ src/session.c |   16 +++-------------
+ 1 files changed, 3 insertions(+), 13 deletions(-)
+
+diff --git a/src/session.c b/src/session.c
+index d3af0c3..308f213 100644
+--- a/src/session.c
++++ b/src/session.c
+@@ -62,7 +62,7 @@ int restore_session()
+               memset(file, 0, FILENAME_MAX);
+               bssid = mac2str(get_bssid(), '\0');
+-              snprintf(file, FILENAME_MAX, "%s/%s.%s", CONF_DIR, bssid, CONF_EXT);
++              snprintf(file, FILENAME_MAX, "%s.%s", bssid, CONF_EXT);
+               free(bssid);
+       }
+@@ -199,18 +199,8 @@ int save_session()
+               }
+               else
+               {       
+-                      /* 
+-                       * If the configuration directory exists, save the session file there; else, save it to the 
+-                       * current working directory.
+-                       */
+-                      if(configuration_directory_exists())
+-                      {
+-                              snprintf((char *) &file_name, FILENAME_MAX, "%s/%s.%s", CONF_DIR, bssid, CONF_EXT);
+-                      }
+-                      else
+-                      {
+-                              snprintf((char *) &file_name, FILENAME_MAX, "%s.%s", bssid, CONF_EXT);
+-                      }
++                      /* save session to the current directory */
++                      snprintf((char *) &file_name, FILENAME_MAX, "%s.%s", bssid, CONF_EXT);
+               }
+               /* Don't bother saving anything if nothing has been done */
+-- 
+1.7.7
+
diff --git a/net/reaver/patches/0003-wash-wpsmon-use-less-useless-spaces-in-output-to-fit.patch b/net/reaver/patches/0003-wash-wpsmon-use-less-useless-spaces-in-output-to-fit.patch
new file mode 100644 (file)
index 0000000..64b290b
--- /dev/null
@@ -0,0 +1,38 @@
+From 638bb8d70d6c7e5dc99975e0bf57d8ce0455e2cc Mon Sep 17 00:00:00 2001
+From: Paul Fertser <fercerpav@gmail.com>
+Date: Tue, 10 Jul 2012 11:25:00 +0400
+Subject: [PATCH 3/3] wash/wpsmon: use less useless spaces in output to fit
+ narrow terminals
+
+Signed-off-by: Paul Fertser <fercerpav@gmail.com>
+---
+ src/wpsmon.c |    6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/wpsmon.c b/src/wpsmon.c
+index 22a394f..e0948b3 100644
+--- a/src/wpsmon.c
++++ b/src/wpsmon.c
+@@ -262,8 +262,8 @@ void monitor(char *bssid, int passive, int source, int channel, int mode)
+       if(!header_printed)
+       {
+-              cprintf(INFO, "BSSID                  Channel       RSSI       WPS Version       WPS Locked        ESSID\n");
+-              cprintf(INFO, "---------------------------------------------------------------------------------------------------------------\n");
++              cprintf(INFO, "BSSID              Channel  RSSI  WPS Version  WPS Locked  ESSID\n");
++              cprintf(INFO, "--------------------------------------------------------------------------------------\n");
+               header_printed = 1;
+       }
+@@ -360,7 +360,7 @@ void parse_wps_settings(const u_char *packet, struct pcap_pkthdr *header, char *
+                                                       break;
+                                       }
+-                                      cprintf(INFO, "%17s      %2d            %.2d        %d.%d               %s               %s\n", bssid, channel, rssi, (wps->version >> 4), (wps->version & 0x0F), lock_display, ssid);
++                                      cprintf(INFO, "%17s    %2d       %.2d   %d.%d          %s         %s\n", bssid, channel, rssi, (wps->version >> 4), (wps->version & 0x0F), lock_display, ssid);
+                               }
+                               if(probe_sent)
+-- 
+1.7.7
+
diff --git a/net/reaver/patches/0100-Include-sys-types.h-for-definition-of-u_char.patch b/net/reaver/patches/0100-Include-sys-types.h-for-definition-of-u_char.patch
new file mode 100644 (file)
index 0000000..541968a
--- /dev/null
@@ -0,0 +1,27 @@
+From 811f5c0b0a226edfbf5aa2f316e083f30ec3cd8d Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Tue, 18 Aug 2015 14:34:26 +0800
+Subject: [PATCH] Include <sys/types.h> for definition of u_char.
+
+Fixes build with musl-libc.
+
+Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
+---
+ src/libwps/libwps.h |    1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/libwps/libwps.h b/src/libwps/libwps.h
+index b04dd8b..bdd7b9a 100755
+--- a/src/libwps/libwps.h
++++ b/src/libwps/libwps.h
+@@ -17,6 +17,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <arpa/inet.h>
++#include <sys/types.h>
+ #define LIBWPS_MAX_STR_LEN 256
+-- 
+1.7.10.4
+
index 4ed2852478cc11a7d1c88a613cd29e9676e04908..69e170145d112b403875fa6b9aa32f026ca1c491 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sqm-scripts
-PKG_SOURCE_VERSION:=c09d5fe55b4f5edcfdd4eaa8f45e382968e0a788
-PKG_VERSION:=1.0.1
+PKG_SOURCE_VERSION:=de551af17e54f07a59e357b951c83b373ee659e5
+PKG_VERSION:=1.0.2
 PKG_RELEASE:=1
 PKG_LICENSE:=GPLv2
 
index f0ea175b179feecd4f26aabae59ae41abb998506..f78c9ead3277348d1845962129b552f37dd2f654 100644 (file)
@@ -348,10 +348,12 @@ endef
 
 define Package/strongswan/install
        $(INSTALL_DIR) $(1)/etc
-       $(CP) $(PKG_INSTALL_DIR)/etc/strongswan.conf $(1)/etc/
+       $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/ipsec.conf $(1)/etc/
+       $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/strongswan.conf $(1)/etc/
        $(INSTALL_DIR) $(1)/usr/lib/ipsec
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/{libstrongswan.so.*,libhydra.so.*} $(1)/usr/lib/ipsec/
        $(INSTALL_CONF) ./files/ipsec.secrets $(1)/etc/
+       $(INSTALL_CONF) ./files/ipsec.user $(1)/etc/
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/ipsec.init $(1)/etc/init.d/ipsec
 endef
@@ -415,8 +417,6 @@ define Plugin/stroke/install
        $(INSTALL_DIR) $(1)/etc/ipsec.d/private
        $(INSTALL_DIR) $(1)/etc/ipsec.d/reqs
 
-       $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/ipsec.conf $(1)/etc/
-
        $(INSTALL_DIR) $(1)/usr/lib/ipsec/plugins
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ipsec/{starter,stroke} $(1)/usr/lib/ipsec/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-stroke.so $(1)/usr/lib/ipsec/plugins/
@@ -427,7 +427,6 @@ define Plugin/updown/install
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/_updown $(1)/usr/lib/ipsec/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-updown.so $(1)/usr/lib/ipsec/plugins/
        $(INSTALL_DIR) $(1)/etc
-       $(INSTALL_CONF) ./files/ipsec.user $(1)/etc/
 endef
 
 define Plugin/whitelist/install
index bcccd01606646eb19d359bacc5e0be4478e35ab4..f46cec615840654d02accb19e76c4859c2338fab 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=xl2tpd
-PKG_VERSION:=1.3.7pre20150524
-PKG_RELEASE:=3
+PKG_VERSION:=devel-20150812
+PKG_RELEASE:=1
 PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=LICENSE
@@ -17,7 +17,7 @@ PKG_LICENSE_FILES:=LICENSE
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/xelerance/xl2tpd.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=1cda2a266e2e957b81019d63a8902b28304a0ac4
+PKG_SOURCE_VERSION:=5674a5835e9b89b7438917a380f3a6d68528fa3e
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 
 PKG_INSTALL:=1
@@ -39,9 +39,28 @@ It does implement both LAC and LNS role in a L2TP networking architecture. The
 main goal of this protocol is to tunnel PPP frame trough an IP network.
 endef
 
-# XXX: CFLAGS are already set by Build/Compile/Default
-MAKE_FLAGS+= \
-       OFLAGS=""
+# Use optimization options from OpenWrt build system
+MAKE_FLAGS += OFLAGS=""
+
+ifneq (0,0)
+  # debugging options from Makefile of xl2tpd package
+  EXTRA_CFLAGS += \
+       -DDEBUG_ZLB \
+       -DDEBUG_HELLO \
+       -DDEBUG_CLOSE \
+       -DDEBUG_FLOW \
+       -DDEBUG_FILE \
+       -DDEBUG_AAA \
+       -DDEBUG_PAYLOAD \
+       -DDEBUG_CONTROL \
+       -DDEBUG_PPPD \
+       -DDEBUG_HIDDEN \
+       -DDEBUG_ENTROPY \
+       -DDEBUG_CONTROL_XMIT \
+       -DDEBUG_MAGIC \
+       -DDEBUG_FLOW_MORE \
+       -DDEBUG_AUTH
+endif
 
 define Package/xl2tpd/conffiles
 /etc/xl2tpd/xl2tpd.conf
index afb3a51c12120301d4a720a0e3bccffafc69def7..8a931adf99ce1ac394c56ee1e75e12ebe11b1eff 100644 (file)
@@ -15,6 +15,7 @@ proto_l2tp_init_config() {
        proto_config_add_string "pppd_options"
        proto_config_add_boolean "ipv6"
        proto_config_add_int "mtu"
+       proto_config_add_int "checkup_interval"
        proto_config_add_string "server"
        available=1
        no_device=1
@@ -39,8 +40,9 @@ proto_l2tp_setup() {
                exit 1
        }
 
-       if [ ! -p /var/run/xl2tpd/l2tp-control ]; then
-               /etc/init.d/xl2tpd start
+       # Start and wait for xl2tpd
+       if [ ! -p /var/run/xl2tpd/l2tp-control -o -z "$(pidof xl2tpd)" ]; then
+               /etc/init.d/xl2tpd restart
 
                local wait_timeout=0
                while [ ! -p /var/run/xl2tpd/l2tp-control ]; do
@@ -54,8 +56,8 @@ proto_l2tp_setup() {
                done
        fi
 
-       local ipv6 demand keepalive username password pppd_options
-       json_get_vars ipv6 demand keepalive username password pppd_options
+       local ipv6 demand keepalive username password pppd_options mtu
+       json_get_vars ipv6 demand keepalive username password pppd_options mtu
        [ "$ipv6" = 1 ] || ipv6=""
        if [ "${demand:-0}" -gt 0 ]; then
                demand="precompiled-active-filter /etc/ppp/filter demand idle $demand"
@@ -63,28 +65,32 @@ proto_l2tp_setup() {
                demand="persist"
        fi
 
-       local mtu
-       [ -n "$mtu" ] || json_get_var mtu mtu
-
        local interval="${keepalive##*[, ]}"
        [ "$interval" != "$keepalive" ] || interval=5
 
-       mkdir -p /tmp/l2tp
+       keepalive="${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive%%[, ]*}}"
+       username="${username:+user \"$username\" password \"$password\"}"
+       ipv6="${ipv6:++ipv6}"
+       mtu="${mtu:+mtu $mtu mru $mtu}"
 
-       echo "${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive%%[, ]*}}" > "${optfile}"
-       echo "usepeerdns" >> "${optfile}"
-       echo "nodefaultroute" >> "${optfile}"
-       echo "${username:+user \"$username\" password \"$password\"}" >> "${optfile}"
-       echo "ipparam \"$interface\"" >> "${optfile}"
-       echo "ifname \"l2tp-$interface\"" >> "${optfile}"
-       echo "ip-up-script /lib/netifd/ppp-up" >> "${optfile}"
-       echo "ipv6-up-script /lib/netifd/ppp-up" >> "${optfile}"
-       echo "ip-down-script /lib/netifd/ppp-down" >> "${optfile}"
-       echo "ipv6-down-script /lib/netifd/ppp-down" >> "${optfile}"
-       # Don't wait for LCP term responses; exit immediately when killed.
-       echo "lcp-max-terminate 0" >> "${optfile}"
-       echo "${ipv6:++ipv6} ${pppd_options}" >> "${optfile}"
-       echo "${mtu:+mtu $mtu mru $mtu}" >> "${optfile}"
+       mkdir -p /tmp/l2tp
+       cat <<EOF >"$optfile"
+usepeerdns
+nodefaultroute
+ipparam "$interface"
+ifname "l2tp-$interface"
+ip-up-script /lib/netifd/ppp-up
+ipv6-up-script /lib/netifd/ppp-up
+ip-down-script /lib/netifd/ppp-down
+ipv6-down-script /lib/netifd/ppp-down
+# Don't wait for LCP term responses; exit immediately when killed.
+lcp-max-terminate 0
+$keepalive
+$username
+$ipv6
+$mtu
+$pppd_options
+EOF
 
        xl2tpd-control add l2tp-${interface} pppoptfile=${optfile} lns=${server} || {
                echo "xl2tpd-control: Add l2tp-$interface failed" >&2
@@ -103,17 +109,6 @@ proto_l2tp_teardown() {
        local optfile="/tmp/l2tp/options.${interface}"
 
        rm -f ${optfile}
-       case "$ERROR" in
-               11|19)
-                       proto_notify_error "$interface" AUTH_FAILED
-                       proto_block_restart "$interface"
-               ;;
-               2)
-                       proto_notify_error "$interface" INVALID_OPTIONS
-                       proto_block_restart "$interface"
-               ;;
-       esac
-
        if [ -p /var/run/xl2tpd/l2tp-control ]; then
                xl2tpd-control remove l2tp-${interface} || {
                        echo "xl2tpd-control: Remove l2tp-$interface failed" >&2
diff --git a/net/xl2tpd/patches/200-xl2tpd-control-check-end-of-file-when-reading-pipe-t.patch b/net/xl2tpd/patches/200-xl2tpd-control-check-end-of-file-when-reading-pipe-t.patch
deleted file mode 100644 (file)
index 811f9af..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-From 7973d45a0e1716ddc6bfb6caf600f826f59a7932 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Tue, 28 Apr 2015 21:26:15 +0800
-Subject: [PATCH 200/210] xl2tpd-control: check end-of-file when reading pipe
- to avoid dead loop.
-
----
- xl2tpd-control.c |   11 +++++++----
- 1 file changed, 7 insertions(+), 4 deletions(-)
-
-diff --git a/xl2tpd-control.c b/xl2tpd-control.c
-index feafe10..e5904d8 100644
---- a/xl2tpd-control.c
-+++ b/xl2tpd-control.c
-@@ -306,17 +306,20 @@ int read_result(int result_fd, char* buf, ssize_t size)
-     /*FIXME: there is a chance to hang up reading.
-              Should I create watching thread with timeout?
-      */
--    ssize_t readed;
-+    ssize_t readed = 0;
-+    ssize_t len;
-+
-     do
-     {
--        readed = read (result_fd, buf, size);
--        if (readed < 0)
-+        len = read (result_fd, buf + readed, size - readed);
-+        if (len < 0)
-         {
-             print_error (ERROR_LEVEL,
-                 "error: can't read command result: %s\n", strerror (errno));
-             break;
-         }
--    } while (readed == 0);
-+        readed += len;
-+    } while (len > 0 && (size - readed) > 0);
-     buf[readed] = '\0';
-     
-     /* scan result code */
--- 
-1.7.10.4
-
diff --git a/net/xl2tpd/patches/201-xl2tpd-control-define-_GNU_SOURCE-to-use-fmemopen-an.patch b/net/xl2tpd/patches/201-xl2tpd-control-define-_GNU_SOURCE-to-use-fmemopen-an.patch
deleted file mode 100644 (file)
index a4f704a..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-From efa0a18b5dfd827792b07acdcb35101229ccf612 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Wed, 29 Apr 2015 10:32:37 +0800
-Subject: [PATCH 201/210] xl2tpd-control: define _GNU_SOURCE to use fmemopen()
- and friends.
-
----
- xl2tpd-control.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/xl2tpd-control.c b/xl2tpd-control.c
-index e5904d8..9b6235d 100644
---- a/xl2tpd-control.c
-+++ b/xl2tpd-control.c
-@@ -10,6 +10,8 @@
-  *
-  */
-  
-+#define _GNU_SOURCE
-+
- #include <stdio.h>
- #include <string.h>
- #include <stdarg.h>
--- 
-1.7.10.4
-
diff --git a/net/xl2tpd/patches/202-xl2tpd-control-open-control-file-with-O_NONBLOCK.patch b/net/xl2tpd/patches/202-xl2tpd-control-open-control-file-with-O_NONBLOCK.patch
deleted file mode 100644 (file)
index 17721f2..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-From fedfd6685e5f81f0460beb4c448a30e7a6cfbd31 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Wed, 29 Apr 2015 14:21:12 +0800
-Subject: [PATCH 202/210] xl2tpd-control: open control file with O_NONBLOCK.
-
-Otherwise xl2tpd-control would block indefinitely in case xl2tpd is
-not running.
----
- xl2tpd-control.c |   10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/xl2tpd-control.c b/xl2tpd-control.c
-index 9b6235d..973ee87 100644
---- a/xl2tpd-control.c
-+++ b/xl2tpd-control.c
-@@ -246,7 +246,7 @@ int main (int argc, char *argv[])
-     print_error (DEBUG_LEVEL, "command to be passed:\n%s\n", buf);
-     /* try to open control file for writing */
--    int control_fd = open (control_filename, O_WRONLY, 0600);
-+    int control_fd = open (control_filename, O_WRONLY | O_NONBLOCK, 0600);
-     if (control_fd < 0)
-     {
-         int errorno = errno;
-@@ -265,6 +265,14 @@ int main (int argc, char *argv[])
-         }
-         return -1;
-     }
-+
-+    /* turn off O_NONBLOCK */
-+    if (fcntl (control_fd, F_SETFL, O_WRONLY) == -1) {
-+        print_error (ERROR_LEVEL,
-+            "Can not turn off nonblocking mode for control_fd: %s\n",
-+            strerror(errno));
-+        return -2;
-+    }
-     
-     /* pass command to control pipe */
-     if (write (control_fd, buf, ftell (mesf)) < 0)
--- 
-1.7.10.4
-
diff --git a/net/xl2tpd/patches/203-xl2tpd-control-cleaup-result-file-atexit.patch b/net/xl2tpd/patches/203-xl2tpd-control-cleaup-result-file-atexit.patch
deleted file mode 100644 (file)
index 66eee64..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-From 07e522cd7e223517389582a8eb647a4a6a8a5cf8 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Thu, 30 Apr 2015 13:53:11 +0800
-Subject: [PATCH 203/210] xl2tpd-control: cleaup result file atexit().
-
----
- xl2tpd-control.c |   21 ++++++++++++++-------
- 1 file changed, 14 insertions(+), 7 deletions(-)
-
-diff --git a/xl2tpd-control.c b/xl2tpd-control.c
-index 973ee87..abc0324 100644
---- a/xl2tpd-control.c
-+++ b/xl2tpd-control.c
-@@ -12,6 +12,7 @@
-  
- #define _GNU_SOURCE
-+#include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- #include <stdarg.h>
-@@ -35,6 +36,9 @@
- #define TUNNEL_REQUIRED 1
- #define TUNNEL_NOT_REQUIRED 0
-+char result_filename[128];
-+int result_fd = -1;
-+
- int log_level = ERROR_LEVEL;
- void print_error (int level, const char *fmt, ...);
-@@ -117,6 +121,14 @@ void help()
-     );
- }
-+void cleanup(void)
-+{
-+    /* cleaning up */
-+    if (result_fd >= 0)
-+          close (result_fd);
-+    unlink (result_filename);
-+}
-+
- int main (int argc, char *argv[])
- {
-     char* control_filename = NULL;
-@@ -195,11 +207,11 @@ int main (int argc, char *argv[])
-     FILE* mesf = fmemopen (buf, CONTROL_PIPE_MESSAGE_SIZE, "w");
-     /* create result pipe for reading */
--    char result_filename[128];
-     snprintf (result_filename, 128, RESULT_FILENAME_FORMAT, getpid());
-     unlink (result_filename);
-     mkfifo (result_filename, 0600);
--    int result_fd = open (result_filename, O_RDONLY | O_NONBLOCK, 0600);
-+    atexit(cleanup);
-+    result_fd = open (result_filename, O_RDONLY | O_NONBLOCK, 0600);
-     if (result_fd < 0)
-     {
-         print_error (ERROR_LEVEL,
-@@ -293,11 +305,6 @@ int main (int argc, char *argv[])
-     );
-     printf ("%s", rbuf);
-     
--    /* cleaning up */
--    
--    close (result_fd);
--    unlink (result_filename);
--    
-     return command_result_code;
- }
--- 
-1.7.10.4
-
diff --git a/net/xl2tpd/patches/204-xl2tpd-control-enhance-output-of-print_error.patch b/net/xl2tpd/patches/204-xl2tpd-control-enhance-output-of-print_error.patch
deleted file mode 100644 (file)
index 4e57507..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-From f6eaaabb0b2fab12cf597b8c1d12d470a13e581f Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Thu, 14 May 2015 14:58:10 +0800
-Subject: [PATCH 204/210] xl2tpd-control: enhance output of print_error().
-
- - Add prefix "xl2tpd-control: " to print_error() output.
- - Output response from xl2tpd only when -d is enabled as result of
-   control command can be retrieved from exit code.
- - Remove some redundant and not that useful verbose output.
----
- xl2tpd-control.c |   10 ++++------
- 1 file changed, 4 insertions(+), 6 deletions(-)
-
-diff --git a/xl2tpd-control.c b/xl2tpd-control.c
-index abc0324..6b08850 100644
---- a/xl2tpd-control.c
-+++ b/xl2tpd-control.c
-@@ -164,7 +164,6 @@ int main (int argc, char *argv[])
-     {
-         control_filename = strdup (CONTROL_PIPE);
-     }
--    print_error (DEBUG_LEVEL, "set control filename to %s\n", control_filename);    
-     /* parse command name */
-     for (command = commands; command->name; command++)
-@@ -176,10 +175,7 @@ int main (int argc, char *argv[])
-         }
-     }
-     
--    if (command->name)
--    {
--        print_error (DEBUG_LEVEL, "get command %s\n", command->name);
--    } else {
-+    if (!command->name) {
-         print_error (ERROR_LEVEL, "error: no such command %s\n", argv[i]);
-         return -1;
-     }
-@@ -303,7 +299,8 @@ int main (int argc, char *argv[])
-     int command_result_code = read_result (
-         result_fd, rbuf, CONTROL_PIPE_MESSAGE_SIZE
-     );
--    printf ("%s", rbuf);
-+    /* rbuf contains a newline, make it double to form a boundary. */
-+    print_error (DEBUG_LEVEL, "command response: \n%s\n", rbuf);
-     
-     return command_result_code;
- }
-@@ -313,6 +310,7 @@ void print_error (int level, const char *fmt, ...)
-     if (level > log_level) return;
-     va_list args;
-     va_start (args, fmt);
-+    fprintf (stderr, "xl2tpd-control: ");
-     vfprintf (stderr, fmt, args);
-     va_end (args);
- }
--- 
-1.7.10.4
-
diff --git a/net/xl2tpd/patches/205-xl2tpd-fix-typo-in-reporting-available-lns-count.patch b/net/xl2tpd/patches/205-xl2tpd-fix-typo-in-reporting-available-lns-count.patch
deleted file mode 100644 (file)
index b25e82b..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-From 1c148f6645f43bf5abd8a9b8f0708a598b357d97 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Thu, 14 May 2015 19:56:39 +0800
-Subject: [PATCH 205/210] xl2tpd: fix typo in reporting available lns count.
-
----
- xl2tpd.c |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/xl2tpd.c b/xl2tpd.c
-index c9b7579..6c945fc 100644
---- a/xl2tpd.c
-+++ b/xl2tpd.c
-@@ -1039,7 +1039,7 @@ int control_handle_available(FILE* resf, char* bufp){
-         lns_count++;
-     }                                               
--    write_res (resf, "%02i AVAILABLE lns.cout=%d\n", 0, lns_count);
-+    write_res (resf, "%02i AVAILABLE lns.count=%d\n", 0, lns_count);
-     lac  = laclist;
-     int lac_count = 0;
-@@ -1053,7 +1053,7 @@ int control_handle_available(FILE* resf, char* bufp){
-     if(deflac){
-         write_res (resf, "%02i AVAILABLE lac.%d.name=%s\n", 0, lac_count, deflac->entname);
-         lac_count++;
--    }                                               
-+    }
-     write_res (resf, "%02i AVAILABLE lac.count=%d\n", 0, lac_count);
-     return 1;
--- 
-1.7.10.4
-
diff --git a/net/xl2tpd/patches/206-xl2tpd-start_pppd-place-opts-after-plugin-pppol2tp.s.patch b/net/xl2tpd/patches/206-xl2tpd-start_pppd-place-opts-after-plugin-pppol2tp.s.patch
deleted file mode 100644 (file)
index 60d8b84..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-From 18fdf802d31354c62a27cc5a63b196780a0d486e Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Wed, 29 Apr 2015 16:30:17 +0800
-Subject: [PATCH 206/210] xl2tpd: start_pppd: place opts after "plugin
- pppol2tp.so".
-
-so that plugin options like pppol2tp_debug_mark can be recognized by
-pppd.  While doing this also add bound check to prevent potential buffer
-overflow problem.
----
- xl2tpd.c |   22 +++++++++++-----------
- 1 file changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/xl2tpd.c b/xl2tpd.c
-index 6c945fc..017adfd 100644
---- a/xl2tpd.c
-+++ b/xl2tpd.c
-@@ -382,7 +382,6 @@ int start_pppd (struct call *c, struct ppp_opts *opts)
-     /* char a, b; */
-     char tty[512];
-     char *stropt[80];
--    struct ppp_opts *p;
- #ifdef USE_KERNEL
-     struct sockaddr_pppol2tp sax;
-     int flags;
-@@ -396,16 +395,7 @@ int start_pppd (struct call *c, struct ppp_opts *opts)
-     struct call *sc;
-     struct tunnel *st;
--    p = opts;
-     stropt[0] = strdup (PPPD);
--    while (p)
--    {
--        stropt[pos] = (char *) malloc (strlen (p->option) + 1);
--        strncpy (stropt[pos], p->option, strlen (p->option) + 1);
--        pos++;
--        p = p->next;
--    }
--    stropt[pos] = NULL;
-     if (c->pppd > 0)
-     {
-         l2tp_log(LOG_WARNING, "%s: PPP already started on call!\n", __FUNCTION__);
-@@ -467,7 +457,6 @@ int start_pppd (struct call *c, struct ppp_opts *opts)
-         snprintf (stropt[pos], 10, "%d", c->ourcid);
-             pos++;
-        }
--        stropt[pos] = NULL;
-     }
-     else
- #endif
-@@ -497,6 +486,17 @@ int start_pppd (struct call *c, struct ppp_opts *opts)
-             return -EINVAL;
-         }
-         stropt[pos++] = strdup(tty);
-+    }
-+
-+    {
-+        struct ppp_opts *p = opts;
-+        int maxn_opts = sizeof(stropt) / sizeof(stropt[0]) - 1;
-+        while (p && pos < maxn_opts)
-+        {
-+            stropt[pos] = strdup (p->option);
-+            pos++;
-+            p = p->next;
-+        }
-         stropt[pos] = NULL;
-     }
--- 
-1.7.10.4
-
diff --git a/net/xl2tpd/patches/207-xl2tpd-introduce-new-option-l-for-using-syslog-as-th.patch b/net/xl2tpd/patches/207-xl2tpd-introduce-new-option-l-for-using-syslog-as-th.patch
deleted file mode 100644 (file)
index 5ab94cb..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-From b3402a68a4d29e9b1ae4e012e39a7bcb14fea3cf Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Thu, 30 Apr 2015 13:57:36 +0800
-Subject: [PATCH 207/210] xl2tpd: introduce new option -l for using syslog as
- the logging facility.
-
-Defaults to old behaviour if no -l option was specified.  Also update
-manual doc to reflect this change.
----
- doc/xl2tpd.8 |    5 +++++
- file.h       |    1 +
- misc.c       |    2 +-
- xl2tpd.c     |   13 ++++++++++++-
- 4 files changed, 19 insertions(+), 2 deletions(-)
-
-diff --git a/doc/xl2tpd.8 b/doc/xl2tpd.8
-index 915b247..7afccac 100644
---- a/doc/xl2tpd.8
-+++ b/doc/xl2tpd.8
-@@ -20,6 +20,11 @@ This option prevents xl2tpd from detaching from the terminal and
- daemonizing.  
- .TP 
-+.B -l
-+This option tells xl2tpd to use syslog for logging even when \fB\-D\fR
-+was specified.
-+
-+.TP
- .B -c <config file>
- Tells xl2tpd to use an alternate config file.  Default is
- /etc/xl2tpd/xl2tpd.conf. Fallback configuration file is
-diff --git a/file.h b/file.h
-index 89987ae..92df046 100644
---- a/file.h
-+++ b/file.h
-@@ -151,6 +151,7 @@ struct global
-     char pidfile[STRLEN];       /* File containing the pid number*/
-     char controlfile[STRLEN];   /* Control file name (named pipe) */
-     int daemon;                 /* Use daemon mode? */
-+    int syslog;                 /* Use syslog for logging? */
-     int accesscontrol;          /* Use access control? */
-     int forceuserspace;         /* Force userspace? */
-     int packet_dump;          /* Dump (print) all packets? */
-diff --git a/misc.c b/misc.c
-index 3092401..cccf4ca 100644
---- a/misc.c
-+++ b/misc.c
-@@ -57,7 +57,7 @@ void l2tp_log (int level, const char *fmt, ...)
-     vsnprintf (buf, sizeof (buf), fmt, args);
-     va_end (args);
-     
--    if(gconfig.daemon) {
-+    if(gconfig.syslog) {
-       init_log();
-       SYSLOG_CALL( syslog (level, "%s", buf) );
-     } else {
-diff --git a/xl2tpd.c b/xl2tpd.c
-index 017adfd..1937690 100644
---- a/xl2tpd.c
-+++ b/xl2tpd.c
-@@ -1594,7 +1594,7 @@ void do_control ()
- void usage(void) {
-     printf("\nxl2tpd version:  %s\n", SERVER_VERSION);
-     printf("Usage: xl2tpd [-c <config file>] [-s <secret file>] [-p <pid file>]\n"
--            "              [-C <control file>] [-D]\n"
-+            "              [-C <control file>] [-D] [-l]\n"
-             "              [-v, --version]\n");
-     printf("\n");
-     exit(1);
-@@ -1605,6 +1605,7 @@ void init_args(int argc, char *argv[])
-     int i=0;
-     gconfig.daemon=1;
-+    gconfig.syslog=-1;
-     memset(gconfig.altauthfile,0,STRLEN);
-     memset(gconfig.altconfigfile,0,STRLEN);
-     memset(gconfig.authfile,0,STRLEN);
-@@ -1642,6 +1643,9 @@ void init_args(int argc, char *argv[])
-         else if (! strncmp(argv[i],"-D",2)) {
-             gconfig.daemon=0;
-         }
-+        else if (! strncmp(argv[i],"-l",2)) {
-+            gconfig.syslog=1;
-+        }
-         else if (! strncmp(argv[i],"-s",2)) {
-             if(++i == argc)
-                 usage();
-@@ -1667,6 +1671,13 @@ void init_args(int argc, char *argv[])
-             usage();
-         }
-     }
-+
-+    /*
-+     * defaults to syslog if no log facility was explicitly
-+     * specified and we are about to daemonize
-+     */
-+    if (gconfig.syslog < 0)
-+        gconfig.syslog = gconfig.daemon;
- }
--- 
-1.7.10.4
-
diff --git a/net/xl2tpd/patches/208-xl2tpd-unlink-result-file-to-prevent-leftover-a-regu.patch b/net/xl2tpd/patches/208-xl2tpd-unlink-result-file-to-prevent-leftover-a-regu.patch
deleted file mode 100644 (file)
index 90694f2..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-From a2b163a65a2d4fbca57c3aa82b526cf8fbc8e449 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Fri, 15 May 2015 10:56:23 +0800
-Subject: [PATCH 208/210] xl2tpd: unlink result file to prevent leftover a
- regular file.
-
----
- xl2tpd.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/xl2tpd.c b/xl2tpd.c
-index 1937690..c11fe66 100644
---- a/xl2tpd.c
-+++ b/xl2tpd.c
-@@ -1582,6 +1582,8 @@ void do_control ()
-         if (resf)
-         {
-             fclose (resf);
-+            /* unlink it anyway to prevent leftover a regular file. */
-+            unlink(res_filename);
-         }
-     }
--- 
-1.7.10.4
-
diff --git a/net/xl2tpd/patches/209-xl2tpd-ignore-SIGPIPE-signal.patch b/net/xl2tpd/patches/209-xl2tpd-ignore-SIGPIPE-signal.patch
deleted file mode 100644 (file)
index a0d88bd..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-From 2d0eff7f56936823d784425d2171be295ba11027 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Fri, 15 May 2015 15:55:10 +0800
-Subject: [PATCH 209/210] xl2tpd: ignore SIGPIPE signal.
-
----
- xl2tpd.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/xl2tpd.c b/xl2tpd.c
-index c11fe66..58ed868 100644
---- a/xl2tpd.c
-+++ b/xl2tpd.c
-@@ -1551,7 +1551,6 @@ void do_control ()
-             /*FIXME: check quotes to allow filenames with spaces?
-               (do not forget quotes escaping to allow filenames with quotes)*/
--            /*FIXME: write to res_filename may cause SIGPIPE, need to catch it*/
-             resf = fopen (res_filename, "w");
-             if (!resf) {
-                 l2tp_log (LOG_DEBUG, "%s: Can't open result file %s\n",
-@@ -1811,6 +1810,7 @@ void init (int argc,char *argv[])
-     signal (SIGCHLD, &sigchld_handler);
-     signal (SIGUSR1, &sigusr1_handler);
-     signal (SIGHUP, &sighup_handler);
-+    signal (SIGPIPE, SIG_IGN);
-     init_scheduler ();
-     unlink(gconfig.controlfile);
--- 
-1.7.10.4
-
diff --git a/net/xl2tpd/patches/210-xl2tpd-control-show-all-available-commands-in-help.patch b/net/xl2tpd/patches/210-xl2tpd-control-show-all-available-commands-in-help.patch
deleted file mode 100644 (file)
index 8eccffa..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-From 26b77b7cdc70beddc68507f74372a4e2815720f0 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Sun, 17 May 2015 10:53:44 +0800
-Subject: [PATCH 210/210] xl2tpd-control: show all available commands in
- --help.
-
----
- xl2tpd-control.c |   63 ++++++++++++++++++++++++++++++++++++++----------------
- 1 file changed, 44 insertions(+), 19 deletions(-)
-
-diff --git a/xl2tpd-control.c b/xl2tpd-control.c
-index 6b08850..b98ff24 100644
---- a/xl2tpd-control.c
-+++ b/xl2tpd-control.c
-@@ -51,6 +51,7 @@ struct command_t
-     char *name;
-     int (*handler) (FILE*, char* tunnel, int optc, char *optv[]);
-     int requires_tunnel;
-+    char *help;
- };
- int command_add_lac (FILE*, char* tunnel, int optc, char *optv[]);
-@@ -65,13 +66,29 @@ int command_available (FILE*, char* tunnel, int optc, char *optv[]);
- struct command_t commands[] = {
-     /* Keep this command mapping for backwards compat */
--    {"add", &command_add_lac, TUNNEL_REQUIRED},
--    {"connect", &command_connect_lac, TUNNEL_REQUIRED},
--    {"disconnect", &command_disconnect_lac, TUNNEL_REQUIRED},
--    {"remove", &command_remove_lac, TUNNEL_REQUIRED},
-+    {"add", &command_add_lac, TUNNEL_REQUIRED,
-+        "\tadd\tadds new or modify existing lac configuration.\n"
-+        "\t\tConfiguration must be specified as command options in\n"
-+        "\t\t<key>=<value> pairs format.\n"
-+        "\t\tSee available options in xl2tpd.conf(5)\n"
-+    },
-+    {"connect", &command_connect_lac, TUNNEL_REQUIRED,
-+        "\tconnect\ttries to activate the tunnel.\n"
-+        "\t\tUsername and secret for the tunnel can be passed as\n"
-+        "\t\tcommand options.\n"
-+    },
-+    {"disconnect", &command_disconnect_lac, TUNNEL_REQUIRED,
-+        "\tdisconnect\tdisconnects the tunnel.\n"
-+    },
-+    {"remove", &command_remove_lac, TUNNEL_REQUIRED,
-+        "\tremove\tremoves lac configuration from xl2tpd.\n"
-+        "\t\txl2tpd disconnects the tunnel before removing.\n"
-+    },
-     /* LAC commands */
--    {"add-lac", &command_add_lac, TUNNEL_REQUIRED},
-+    {"add-lac", &command_add_lac, TUNNEL_REQUIRED,
-+        "\tadd-lns\tadds new or modify existing lns configuration.\n"
-+    },
-     {"connect-lac", &command_connect_lac, TUNNEL_REQUIRED},
-     {"disconnect-lac", &command_disconnect_lac, TUNNEL_REQUIRED},
-     {"remove-lac", &command_remove_lac, TUNNEL_REQUIRED},
-@@ -89,36 +106,44 @@ struct command_t commands[] = {
- void usage()
- {
-+    int i;
-+
-     printf ("\nxl2tpd server version %s\n", SERVER_VERSION);
-     printf ("Usage: xl2tpd-control [-c <PATH>] <command> <tunnel name> [<COMMAND OPTIONS>]\n"
-             "\n"
-             "    -c\tspecifies xl2tpd control file\n"
-             "    -d\tspecify xl2tpd-control to run in debug mode\n"
-             "--help\tshows extended help\n"
--            "Available commands: add, connect, disconnect, remove, add-lns\n"
-     );
-+
-+    printf ("Available commands: ");
-+    for (i = 0; commands[i].name; i++) {
-+        struct command_t *command = &commands[i];
-+        int last = command[1].name == NULL;
-+
-+        printf ("%s%s", command->name, !last ? ", " : "\n");
-+    }
- }
- void help()
- {
-+    int i;
-+
-     usage();
-     printf (
-         "\n"
-         "Commands help:\n"
--        "\tadd\tadds new or modify existing lac configuration.\n"
--        "\t\tConfiguration must be specified as command options in\n"
--        "\t\t<key>=<value> pairs format.\n"
--        "\t\tSee available options in xl2tpd.conf(5)\n"
--        "\tconnect\ttries to activate the tunnel.\n"
--        "\t\tUsername and secret for the tunnel can be passed as\n"
--        "\t\tcommand options.\n"
--        "\tdisconnect\tdisconnects the tunnel.\n"
--        "\tremove\tremoves lac configuration from xl2tpd.\n"
--        "\t\txl2tpd disconnects the tunnel before removing.\n"
--        "\n"
--        "\tadd-lns\tadds new or modify existing lns configuration.\n"
--        "See xl2tpd-control man page for more help\n"
-     );
-+
-+    for (i = 0; commands[i].name; i++) {
-+        struct command_t *command = &commands[i];
-+
-+        if (!command->help)
-+            continue;
-+        printf ("%s", command->help);
-+    }
-+    /*FIXME Ha! there is currently no manpage for xl2tpd-control */
-+    printf ("See xl2tpd-control man page for more help\n");
- }
- void cleanup(void)
--- 
-1.7.10.4
-
index 845360301fe452c8e788f95c354cd327666344ec..52e2228671156ef6b20505b2b25680187201b270 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mpd
 PKG_VERSION:=0.19.10
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.musicpd.org/download/mpd/0.19/
@@ -28,13 +28,14 @@ PKG_CONFIG_DEPENDS:= \
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
 
 define Package/mpd/Default
   SECTION:=sound
   CATEGORY:=Sound
   TITLE:=Music Player Daemon
   URL:=http://www.musicpd.org/
-  DEPENDS:= +glib2 +libcurl +libpthread +libmpdclient +libstdcpp \
+  DEPENDS:= +glib2 +libcurl +libpthread +libmpdclient +libstdcpp $(ICONV_DEPENDS) \
            +libflac +BUILD_PATENTED:libmad +libvorbisidec +AUDIO_SUPPORT:alsa-lib \
             +boost +boost-container +libexpat
 endef
@@ -151,7 +152,7 @@ CONFIGURE_VARS += \
        $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
        $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
 
-TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
+TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv)
 
 ifeq ($(BUILD_VARIANT),full)
 
index 657ff70bede0e6faacf800d9b6f1ea04a03ce911..d5427120b78f453f954c7358e832c9c361e5f190 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=acpid
-PKG_VERSION:=2.0.23
+PKG_VERSION:=2.0.25
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@SF/acpid2 
-PKG_MD5SUM:=d7bcdcdefcd53b03730e50ba842554ea
+PKG_MD5SUM:=69bb0cc4a0a89eb2dfecc4851087f568
 PKG_MAINTAINER:=Thomas Heil<heil@terminal-consulting.de>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
diff --git a/utils/acpid/patches/001-musl-compat.patch b/utils/acpid/patches/001-musl-compat.patch
deleted file mode 100644 (file)
index 086361f..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-Index: acpid-2.0.23/tempfailure.h
-===================================================================
---- /dev/null
-+++ acpid-2.0.23/tempfailure.h
-@@ -0,0 +1,8 @@
-+#ifndef TEMP_FAILURE_RETRY
-+#define TEMP_FAILURE_RETRY(expression) \
-+  (__extension__                                                              \
-+    ({ long int __result;                                                     \
-+       do __result = (long int) (expression);                                 \
-+       while (__result == -1L && errno == EINTR);                             \
-+       __result; }))
-+#endif
-Index: acpid-2.0.23/acpi_listen.c
-===================================================================
---- acpid-2.0.23.orig/acpi_listen.c
-+++ acpid-2.0.23/acpi_listen.c
-@@ -39,6 +39,8 @@
- #include "acpid.h"
- #include "ud_socket.h"
-+#include "tempfailure.h"
-+
- static int handle_cmdline(int *argc, char ***argv);
- static char *read_line(int fd);
-Index: acpid-2.0.23/acpid.c
-===================================================================
---- acpid-2.0.23.orig/acpid.c
-+++ acpid-2.0.23/acpid.c
-@@ -41,6 +41,7 @@
- #include "input_layer.h"
- #include "inotify_handler.h"
- #include "netlink.h"
-+#include "tempfailure.h"
- static int handle_cmdline(int *argc, char ***argv);
- static void close_fds(void);
-Index: acpid-2.0.23/event.c
-===================================================================
---- acpid-2.0.23.orig/event.c
-+++ acpid-2.0.23/event.c
-@@ -40,6 +40,9 @@
- #include "sock.h"
- #include "ud_socket.h"
- #include "event.h"
-+
-+#include "tempfailure.h"
-+
- /*
-  * What is a rule?  It's polymorphic, pretty much.
-  */
-Index: acpid-2.0.23/input_layer.c
-===================================================================
---- acpid-2.0.23.orig/input_layer.c
-+++ acpid-2.0.23/input_layer.c
-@@ -47,6 +47,8 @@
- #define DIM(a)  (sizeof(a) / sizeof(a[0]))
-+#include "tempfailure.h"
-+
- struct evtab_entry {
-       struct input_event event;
-       const char *str;
-Index: acpid-2.0.23/kacpimon/libnetlink.c
-===================================================================
---- acpid-2.0.23.orig/kacpimon/libnetlink.c
-+++ acpid-2.0.23/kacpimon/libnetlink.c
-@@ -26,6 +26,8 @@
- #include "libnetlink.h"
-+#include "../tempfailure.h"
-+
- void rtnl_close(struct rtnl_handle *rth)
- {
-       if (rth->fd >= 0) {
-Index: acpid-2.0.23/netlink.c
-===================================================================
---- acpid-2.0.23.orig/netlink.c
-+++ acpid-2.0.23/netlink.c
-@@ -46,6 +46,7 @@
- #include "connection_list.h"
- #include "netlink.h"
-+#include "tempfailure.h"
- static void
- format_netlink(struct nlmsghdr *msg)
-Index: acpid-2.0.23/proc.c
-===================================================================
---- acpid-2.0.23.orig/proc.c
-+++ acpid-2.0.23/proc.c
-@@ -34,6 +34,8 @@
- #include "proc.h"
-+#include "tempfailure.h"
-+
- const char *eventfile = ACPID_EVENTFILE;
- static char *read_line(int fd);
-Index: acpid-2.0.23/ud_socket.c
-===================================================================
---- acpid-2.0.23.orig/ud_socket.c
-+++ acpid-2.0.23/ud_socket.c
-@@ -22,6 +22,8 @@
- #include "log.h"
- #include "ud_socket.h"
-+#include "tempfailure.h"
-+
- int
- ud_create_socket(const char *name, mode_t socketmode)
- {
-Index: acpid-2.0.23/libnetlink.c
-===================================================================
---- acpid-2.0.23.orig/libnetlink.c
-+++ acpid-2.0.23/libnetlink.c
-@@ -26,6 +26,8 @@
- #include "libnetlink.h"
-+#include "tempfailure.h"
-+
- void rtnl_close(struct rtnl_handle *rth)
- {
-       if (rth->fd >= 0) {
index 9586da5c546ed8f349b9578ebf43487b4026afc8..b424c24ea34c1c79cd8279dd53bb6a02cf72ff89 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 BASE_VERSION:=4.3
 
 PKG_NAME:=bash
-PKG_VERSION:=$(BASE_VERSION).39
+PKG_VERSION:=$(BASE_VERSION).42
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(BASE_VERSION).tar.gz
diff --git a/utils/bash/patches/140-upstream-bash43-040.patch b/utils/bash/patches/140-upstream-bash43-040.patch
new file mode 100644 (file)
index 0000000..a329d37
--- /dev/null
@@ -0,0 +1,38 @@
+                            BASH PATCH REPORT
+                            =================
+
+Bash-Release:  4.3
+Patch-ID:      bash43-040
+
+Bug-Reported-by:       Jean Delvare <jdelvare@suse.de>
+Bug-Reference-ID:      <20150609180231.5f463695@endymion.delvare>
+Bug-Reference-URL:     http://lists.gnu.org/archive/html/bug-bash/2015-06/msg00033.html
+
+Bug-Description:
+
+There is a memory leak that occurs when bash expands an array reference on
+the rhs of an assignment statement.
+
+Patch (apply with `patch -p0'):
+
+--- a/subst.c
++++ b/subst.c
+@@ -5782,7 +5782,7 @@ expand_arrayref:
+       /* XXX - does this leak if name[@] or name[*]? */
+       if (pflags & PF_ASSIGNRHS)
+         {
+-          temp = array_variable_name (name, &tt, (int *)0);
++          var = array_variable_part (name, &tt, (int *)0);
+           if (ALL_ELEMENT_SUB (tt[0]) && tt[1] == ']')
+           temp = array_value (name, quoted|Q_DOUBLE_QUOTES, 0, &atype, &ind);
+         else
+--- a/patchlevel.h
++++ b/patchlevel.h
+@@ -25,6 +25,6 @@
+    regexp `^#define[  ]*PATCHLEVEL', since that's what support/mkversion.sh
+    looks for to find the patch level (for the sccs version string). */
+-#define PATCHLEVEL 39
++#define PATCHLEVEL 40
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/utils/bash/patches/141-upstream-bash43-041.patch b/utils/bash/patches/141-upstream-bash43-041.patch
new file mode 100644 (file)
index 0000000..75fdace
--- /dev/null
@@ -0,0 +1,67 @@
+                            BASH PATCH REPORT
+                            =================
+
+Bash-Release:  4.3
+Patch-ID:      bash43-041
+
+Bug-Reported-by:       Hanno Böck <hanno@hboeck.de>
+Bug-Reference-ID:      <20150623131106.6f111da9@pc1>, <20150707004640.0e61d2f9@pc1>
+Bug-Reference-URL:     http://lists.gnu.org/archive/html/bug-bash/2015-06/msg00089.html,
+                       http://lists.gnu.org/archive/html/bug-bash/2015-07/msg00018.html
+
+Bug-Description:
+
+There are several out-of-bounds read errors that occur when completing command
+lines where assignment statements appear before the command name.  The first
+two appear only when programmable completion is enabled; the last one only
+happens when listing possible completions.
+
+Patch (apply with `patch -p0'):
+
+--- a/bashline.c
++++ b/bashline.c
+@@ -1468,10 +1468,23 @@ attempt_shell_completion (text, start, e
+       os = start;
+       n = 0;
++      was_assignment = 0;
+       s = find_cmd_start (os);
+       e = find_cmd_end (end);
+       do
+       {
++        /* Don't read past the end of rl_line_buffer */
++        if (s > rl_end)
++          {
++            s1 = s = e1;
++            break;
++          }
++        /* Or past point if point is within an assignment statement */
++        else if (was_assignment && s > rl_point)
++          {
++            s1 = s = e1;
++            break;
++          }
+         /* Skip over assignment statements preceding a command name.  If we
+            don't find a command name at all, we can perform command name
+            completion.  If we find a partial command name, we should perform
+--- a/lib/readline/complete.c
++++ b/lib/readline/complete.c
+@@ -689,6 +689,8 @@ printable_part (pathname)
+   if (temp == 0 || *temp == '\0')
+     return (pathname);
++  else if (temp[1] == 0 && temp == pathname)
++    return (pathname);
+   /* If the basename is NULL, we might have a pathname like '/usr/src/'.
+      Look for a previous slash and, if one is found, return the portion
+      following that slash.  If there's no previous slash, just return the
+--- a/patchlevel.h
++++ b/patchlevel.h
+@@ -25,6 +25,6 @@
+    regexp `^#define[  ]*PATCHLEVEL', since that's what support/mkversion.sh
+    looks for to find the patch level (for the sccs version string). */
+-#define PATCHLEVEL 40
++#define PATCHLEVEL 41
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/utils/bash/patches/142-upstream-bash43-042.patch b/utils/bash/patches/142-upstream-bash43-042.patch
new file mode 100644 (file)
index 0000000..bf1546b
--- /dev/null
@@ -0,0 +1,50 @@
+                            BASH PATCH REPORT
+                            =================
+
+Bash-Release:  4.3
+Patch-ID:      bash43-042
+
+Bug-Reported-by:       Nathan Neulinger <nneul@neulinger.org>
+Bug-Reference-ID:      <558EFDF2.7060402@neulinger.org>
+Bug-Reference-URL:     http://lists.gnu.org/archive/html/bug-bash/2015-06/msg00096.html
+
+Bug-Description:
+
+There is a problem when parsing command substitutions containing `case'
+commands within pipelines that causes the parser to not correctly identify
+the end of the command substitution.
+
+Patch (apply with `patch -p0'):
+
+--- a/parse.y
++++ b/parse.y
+@@ -3708,6 +3708,8 @@ eof_error:
+ /*itrace("parse_comsub:%d: lex_inword -> 1 ch = `%c' (%d)", line_number, ch, __LINE__);*/
+             tflags |= LEX_INWORD;
+             lex_wlen = 0;
++            if (tflags & LEX_RESWDOK)
++              lex_rwlen = 0;
+           }
+       }
+--- a/y.tab.c
++++ b/y.tab.c
+@@ -6020,6 +6020,8 @@ eof_error:
+ /*itrace("parse_comsub:%d: lex_inword -> 1 ch = `%c' (%d)", line_number, ch, __LINE__);*/
+             tflags |= LEX_INWORD;
+             lex_wlen = 0;
++            if (tflags & LEX_RESWDOK)
++              lex_rwlen = 0;
+           }
+       }
+--- a/patchlevel.h
++++ b/patchlevel.h
+@@ -25,6 +25,6 @@
+    regexp `^#define[  ]*PATCHLEVEL', since that's what support/mkversion.sh
+    looks for to find the patch level (for the sccs version string). */
+-#define PATCHLEVEL 41
++#define PATCHLEVEL 42
+ #endif /* _PATCHLEVEL_H_ */
index 59c763f9a72ab8562187ceae60b225955900ff26..04fa0ae26abf98af22ee82959d2c3493e2b2f574 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=crelay
-PKG_VERSION:=0.8-081415
+PKG_VERSION:=0.9
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/ondrej1024/crelay
-PKG_SOURCE_VERSION:=037360cf143d705ea97b32ae22460f346ad2586f
+PKG_SOURCE_VERSION:=V$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 
@@ -22,6 +22,7 @@ PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=LICENSE
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
 
 define Package/crelay
   SECTION:=utils
@@ -52,6 +53,7 @@ TARGET_CFLAGS+= \
        -I$(STAGING_DIR)/usr/include/libftdi1 \
        -I$(STAGING_DIR)/usr/include/hidapi
 
+TARGET_LDFLAGS+= $(if $(ICONV_FULL),-liconv)
 
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR)/src \
@@ -65,6 +67,7 @@ define Package/crelay/install
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/crelay $(1)/usr/bin/
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/crelay.init $(1)/etc/init.d/crelay
+       $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/crelay.conf $(1)/etc
 endef
 
 $(eval $(call BuildPackage,crelay))
index 2f4647500ff7863dcb97620d362274ffc1dd17e7..e00396118e7644bcab6a1a5e2d1c89e8399d0bbf 100644 (file)
@@ -8,17 +8,14 @@ PROG=/usr/bin/${NAME}
 
 USE_PROCD=1
 
-# Custom relay labels (for Web GUI)
-LABEL1=""
-LABEL2=""
-LABEL3=""
-LABEL4=""
+# Custom relay labels (for Web GUI) are defined in /etc/crelay.conf
 
 start_service() {
        procd_open_instance
 
        procd_set_param command "$PROG"
-       procd_append_param command -d "$LABEL1 $LABEL2 $LABEL3 $LABEL4"
+       # daemon mode (not daemonized) - starts HTTP server
+       procd_append_param command -d
 
        procd_close_instance
 }
index 756d45a9c73088d660c53869e0b47bc3247acab6..bc4ff1ed32fd758e802afb7b731d3843de7a24db 100644 (file)
@@ -1,10 +1,10 @@
 --- a/src/Makefile
 +++ b/src/Makefile
-@@ -44,7 +44,7 @@ endif
+@@ -45,7 +45,7 @@ endif
  #ifdef DRV_SAINSMART
  ifeq ($(DRV_SAINSMART), y)
  SRC   += relay_drv_sainsmart.c
--LIBS  += -lftdi 
+-LIBS  += -lftdi
 +LIBS  += -lftdi1
  OPTS  += -DDRV_SAINSMART
  endif
diff --git a/utils/crelay/patches/020-link_using_LDFLAGS.patch b/utils/crelay/patches/020-link_using_LDFLAGS.patch
new file mode 100644 (file)
index 0000000..9154b08
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -61,7 +61,7 @@ all: $(BIN)
+ $(BIN):       $(OBJ)
+       @echo "[Link $(BIN)] with libs $(LIBS)"
+-      @$(CC) -o $(BIN) $(OBJ) $(LIBS)
++      @$(CC) -o $(BIN) $(OBJ) $(LDFLAGS) $(LIBS)
+ .c.o:
+       @echo "[Compile $<]"
index 2b5081ea2ca180e2583f6e6ce01eadd9091e9497..5fa70ba3c6358cb1c28da08c143c1256b928e1a2 100644 (file)
@@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
 
 # Make sure to also update the dbus-x package
 PKG_NAME:=dbus
-PKG_VERSION:=1.9.14
+PKG_VERSION:=1.9.20
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://dbus.freedesktop.org/releases/dbus/
-PKG_MD5SUM:=32cd0d16067422bfd691e2f647b432b0
+PKG_MD5SUM:=d5a6f0467612054d3bc7361e42ac6ee9
 PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
 PKG_LICENSE:=AFL-2.1
 
index adf0d047893f646c58ae8b6a611779ac0a23342b..c8913441f5ff19ae7e10dca4bb21ae13d1493f3a 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2014 OpenWrt.org
+# Copyright (C) 2007-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=lsof
-PKG_VERSION:=4.86
-PKG_RELEASE:=3
+PKG_VERSION:=4.89
+PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)+dfsg.orig.tar.gz
-PKG_SOURCE_URL:=http://ftp2.de.debian.org/debian/pool/main/l/lsof
-PKG_MD5SUM:=23420509564a897b76055f9d84d19068
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)+dfsg.orig
+PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://sunsite.ualberta.ca/pub/Mirror/lsof/ ftp://ftp.fu-berlin.de/pub/unix/tools/lsof
+PKG_MD5SUM:=1b9cd34f3fb86856a125abbf2be3a386
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)
 PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
 PKG_LICENSE:=Unique
 PKG_LICENSE_FILES:=00README
@@ -32,17 +32,22 @@ define Package/lsof
   URL:=http://people.freebsd.org/~abe/
 endef
 
-ifeq ($(CONFIG_IPV6),y)
-  LINUX_CLIB_IPV6="-DHASIPv6"
+ifneq ($(CONFIG_IPV6),n)
+  LINUX_CLIB_IPV6=-DHASIPv6
 else
   LINUX_CLIB_IPV6=
 endif
 
+define Build/Prepare
+       $(PKG_UNPACK)
+       (cd $(PKG_BUILD_DIR) && tar -xf $(PKG_NAME)_$(PKG_VERSION)_src.tar && mv $(PKG_NAME)_$(PKG_VERSION)_src/* .)
+       $(Build/Patch)
+endef
+
 define Build/Configure
        cd $(PKG_BUILD_DIR); \
                LINUX_CLIB="-DGLIBCV=2 $(LINUX_CLIB_IPV6)" \
                LSOF_CC="$(TARGET_CC)" \
-               LSOF_INCLUDE="-I$(STAGING_DIR)/usr/include" \
                LSOF_VSTR="$(LINUX_VERSION)" \
                LSOF_CFGF="$(TARGET_CFLAGS)" \
                LSOF_CFGL="$(TARGET_LDFLAGS)" \
index c74c1e3f95379145e34f6dc8f5ad8b2a7cd454ab..f3168e579e2106dedc8e6a9b39f08c51b2d62a86 100644 (file)
@@ -1,6 +1,8 @@
+diff --git a/Configure b/Configure
+index e4a25a2..3a6e78b 100755
 --- a/Configure
 +++ b/Configure
-@@ -2806,7 +2806,7 @@ return(0); }
+@@ -2923,7 +2923,7 @@ return(0); }
        LSOF_TMP1=1
        fi      # }
      fi        # }
index 8f1867dc0169a0d4ee3b81d055c2702d0a30afd3..e2f162ba752b089cbc2b57676a1287be2f968107 100644 (file)
@@ -1,6 +1,8 @@
+diff --git a/Configure b/Configure
+index 3a6e78b..a2946c6 100755
 --- a/Configure
 +++ b/Configure
-@@ -2682,6 +2682,9 @@ LOCKF_OWNER4
+@@ -2788,6 +2788,9 @@ LOCKF_OWNER4
      if test "X$LSOF_CC" = "X" # {
      then
        LSOF_CC=cc
index 224e851bd66c4c9577c29b59e7770f4e0ae38c75..a48b15b628fba89fda458503d6529b8ab3c6b8e8 100644 (file)
@@ -1,5 +1,5 @@
 # 
-# Copyright (C) 2014 OpenWrt.org
+# Copyright (C) 2014-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -7,12 +7,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rtklib
-PKG_VERSION:=2.4.2_p9
+PKG_VERSION:=2.4.2_p11
 PKG_RELEASE:=$(PKG_SOURCE_VERSION)
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=git://github.com/tomojitakasu/RTKLIB.git
-PKG_SOURCE_VERSION:=5592bb575ceb27f2ce0f0f5a84eda38497006c15
+PKG_SOURCE_URL:=git://github.com/nunojpg/RTKLIB.git
+PKG_SOURCE_VERSION:=df578f4d6708ae0b648c254d168882285d0053cc
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_LICENSE:=BSD-2-Clause