include $(TOPDIR)/rules.mk
PKG_NAME:=monit
-PKG_VERSION:=5.12.2
+PKG_VERSION:=5.13
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://mmonit.com/monit/dist
-PKG_MD5SUM:=5f5cf4c18b42e8091b49b4e07cf972ce
+PKG_MD5SUM:=7902ff45eaa1303ac25f6366eff251ef
PKG_LICENSE:=AGPL-3.0
PKG_LICENSE_FILES:=COPYING
--- a/configure
+++ b/configure
-@@ -13821,14 +13821,7 @@ fi
+@@ -13849,14 +13849,7 @@ fi
# Find the right directory to put the root-mode PID file in
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pid file location" >&5
$as_echo_n "checking pid file location... " >&6; }
include $(TOPDIR)/rules.mk
PKG_NAME:=zabbix
-PKG_VERSION:=2.4.4
+PKG_VERSION:=2.4.5
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/zabbix
-PKG_MD5SUM:=400a3e2ebec80e2f1fe86d1b32bfd2e1
+PKG_MD5SUM:=a82eb0d55d3ca947e10a4a55238f4388
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
PKG_NAME:=perl-compress-bzip2
PKG_VERSION:=2.22
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/R/RU/RURBAN/
PKG_SOURCE:=Compress-Bzip2-$(PKG_VERSION).tar.gz
PKG_NAME:=perl-dbi
PKG_VERSION:=1.633
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/T/TI/TIMB/
PKG_SOURCE:=DBI-$(PKG_VERSION).tar.gz
PKG_NAME:=perl-html-parser
PKG_VERSION:=3.71
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS/
PKG_SOURCE:=HTML-Parser-$(PKG_VERSION).tar.gz
PKG_NAME:=perl-www-curl
PKG_VERSION:=4.17
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/S/SZ/SZBALINT/
PKG_SOURCE:=WWW-Curl-$(PKG_VERSION).tar.gz
endef
define Build/Configure
- $(call perlmod/Configure,-n,)
+ $(call perlmod/Configure,,)
endef
define Build/Compile
PKG_NAME:=perl
PKG_VERSION:=5.20.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=ftp://ftp.cpan.org/pub/CPAN/src/5.0 \
http://www.cpan.org/src/5.0/perl-5.20.0.tar.gz \
# Static host perl
define Host/Configure
- ( cd $(HOST_BUILD_DIR); ./Configure -der -Uusedl -Duserelocatableinc -Dprefix=$(HOST_PERL_PREFIX) )
+ ( cd $(HOST_BUILD_DIR); ./Configure -der -Uusedl -Duserelocatableinc -Dprefix=$(HOST_PERL_PREFIX) $(if $(CONFIG_PERL_THREADS),-Dusethreads,))
endef
define Host/Install
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='-D_REENTRANT -D_GNU_SOURCE %%CFLAGS%%'
+ccflags='-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols='__ARM_ARCH_3__=1'
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='%%CFLAGS%%'
+ccflags='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols='__ARM_ARCH_3__=1'
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='-D_REENTRANT -D_GNU_SOURCE %%CFLAGS%%'
+ccflags='-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols='__ARM_ARCH_3__=1'
strerror_r_proto='REENTRANT_PROTO_B_IBW'
#strings='/usr/include/string.h'
submit=''
-subversion='0'
sysman='/usr/share/man/man1'
tail=''
tar=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='%%CFLAGS%%'
+ccflags='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols='__ARM_ARCH_3__=1'
strerror_r_proto='0'
#strings='/usr/include/string.h'
submit=''
-subversion='0'
sysman='/usr/share/man/man1'
tail=''
tar=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='-D_REENTRANT -D_GNU_SOURCE %%CFLAGS%%'
+ccflags='-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='%%CFLAGS%%'
+ccflags='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='-D_REENTRANT -D_GNU_SOURCE %%CFLAGS%%'
+ccflags='-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='%%CFLAGS%%'
+ccflags='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='-D_REENTRANT -D_GNU_SOURCE %%CFLAGS%%'
+ccflags='-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='%%CFLAGS%%'
+ccflags='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='-D_REENTRANT -D_GNU_SOURCE %%CFLAGS%%'
+ccflags='-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='%%CFLAGS%%'
+ccflags='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='-D_REENTRANT -D_GNU_SOURCE %%CFLAGS%%'
+ccflags='-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='%%CFLAGS%%'
+ccflags='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='-D_REENTRANT -D_GNU_SOURCE %%CFLAGS%%'
+ccflags='-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols='__gnu_linux__=1 __linux=1 __linux__=1 __unix=1 __unix__=1 system=linux system=posix system=unix'
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='%%CFLAGS%%'
+ccflags='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols='__gnu_linux__=1 __linux=1 __linux__=1 __unix=1 __unix__=1 system=linux system=posix system=unix'
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='-D_REENTRANT -D_GNU_SOURCE %%CFLAGS%%'
+ccflags='-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='%%CFLAGS%%'
+ccflags='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
endif
PERL_CMD:=$(STAGING_DIR_HOST)/usr/bin/perl5.20.0
-MOD_CFLAGS_PERL:=$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)
+MOD_CFLAGS_PERL:=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(TARGET_CFLAGS) $(TARGET_CPPFLAGS)
ifdef CONFIG_PERL_THREADS
MOD_CFLAGS_PERL+= -D_REENTRANT -D_GNU_SOURCE
endif
endef
define perlmod/Configure
- (cd $(PKG_BUILD_DIR); \
+ (cd $(if $(3),$(3),$(PKG_BUILD_DIR)); \
PERL_MM_USE_DEFAULT=1 \
$(2) \
- $(PERL_CMD) Makefile.PL \
+ $(PERL_CMD) -MConfig -e '$$$${tied %Config::Config}{cpprun}="$(GNU_TARGET_NAME)-cpp -E"; do "Makefile.PL"' \
$(1) \
AR=ar \
CC=$(GNU_TARGET_NAME)-gcc \
EXE_EXT=" " \
FULL_AR=$(GNU_TARGET_NAME)-ar \
LD=$(GNU_TARGET_NAME)-gcc \
- LDDLFLAGS="-shared $(TARGET_LDFLAGS)" \
+ LDDLFLAGS="-shared -rdynamic $(TARGET_LDFLAGS)" \
LDFLAGS="$(EXTRA_LIBDIRS:%=-L%) $(EXTRA_LIBS:%=-l%) " \
LIBC=" " \
LIB_EXT=.a \
define perlmod/Compile
PERL5LIB=$(PERL_LIB) \
$(2) \
- $(MAKE) -C $(PKG_BUILD_DIR) \
+ $(MAKE) -C $(if $(3),$(3),$(PKG_BUILD_DIR)) \
$(1) \
install
endef
--- /dev/null
+#
+# Copyright (C) 2014-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:=libev
+PKG_VERSION:=4.19
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://dist.schmorp.de/libev/Attic/
+PKG_MD5SUM:=01d1c672697f649b4f94abd0b70584ff
+PKG_LICENSE:=BSD-2-Clause
+PKG_MAINTAINER:=Karl Palsson <karlp@tweak.net.au>
+
+PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_USE_MIPS16:=0
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libev
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=High-performance event loop
+ URL:=http://software.schmorp.de/pkg/libev.html
+endef
+
+define Package/libev/description
+ A full-featured and high-performance event loop that is loosely modelled after
+ libevent, but without its limitations and bugs.
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+CONFIGURE_ARGS += \
+ --enable-shared \
+ --enable-static \
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libev.{a,so*} $(1)/usr/lib/
+endef
+
+define Package/libev/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libev.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libev))
--- /dev/null
+#
+# 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
+
+# Although liblz4 exports a major.minor.patch version, it isn't always
+# incremented for new releases, so use the release tag instead.
+PKG_NAME:=liblz4
+PKG_VERSION:=r129
+PKG_RELEASE:=1
+
+PKG_LICENSE:=BSD-2-Clause
+PKG_MAINTAINER:=Darik Horn <dajhorn@vanadac.com>
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://github.com/Cyan4973/lz4.git
+PKG_SOURCE_VERSION:=$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/liblz4
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Extremely fast compression
+ URL:=http://www.lz4.org/
+endef
+
+define Package/liblz4/description
+ LZ4 is a compression codec that features a very fast encoder and an
+ even faster decoder. This package provides the liblz4 shared library.
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+define Build/Compile
+ $(MAKE) -C "$(PKG_BUILD_DIR)/lib" $(MAKE_INSTALL_FLAGS) \
+ CC="$(TARGET_CC)" \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ PREFIX="$(CONFIGURE_PREFIX)" \
+ install
+endef
+
+define Build/InstallDev
+ $(CP) $(PKG_INSTALL_DIR)/* $(1)/
+endef
+
+define Package/liblz4/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblz4.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,liblz4))
--- /dev/null
+#
+# 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:=libnet
+PKG_VERSION:=1.2-rc3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://sourceforge.net/projects/libnet-dev/files/
+PKG_MD5SUM:=f051e6e5bdecddb90f77c701c2ca1804
+PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+TARGET_CFLAGS += $(FPIC)
+
+define Package/libnet-1.2.x
+ SECTION:=libs
+ CATEGORY:=Libraries
+ DEPENDS:=+libpcap
+ TITLE:=Low-level packet creation library
+endef
+
+
+CONFIGURE_ARGS += \
+ --enable-shared \
+ --enable-static
+
+CONFIGURE_VARS += \
+ ac_cv_libnet_endianess=$(ENDIANESS) \
+ ac_libnet_have_pf_packet=yes \
+ LL_INT_TYPE=libnet_link_linux
+
+define Build/Configure
+ (cd $(PKG_BUILD_DIR); touch \
+ configure.in \
+ include.m4 \
+ aclocal.m4 \
+ Makefile.in \
+ );
+ $(call Build/Configure/Default)
+endef
+
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/libnet-1.2.x/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/libnet.h $(STAGING_DIR)/usr/lib/libnet-1.2.x/include
+
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/libnet-1.2.x/include/libnet
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/libnet/libnet-*.h $(STAGING_DIR)/usr/lib/libnet-1.2.x/include/libnet
+
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/libnet-1.2.x/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.{a,la,so*} $(STAGING_DIR)/usr/lib/libnet-1.2.x/lib
+endef
+
+define Package/libnet-1.2.x/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libnet-1.2.x))
#
-# 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.
PKG_NAME:=opus
PKG_VERSION:=1.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://downloads.xiph.org/releases/opus/
endef
define Package/libopus/description
- Opus is a totally open, royalty-free, highly versatile audio codec. Opus is
- unmatched for interactive speech and music transmission over the Internet, but
+ Opus is a totally open, royalty-free, highly versatile audio codec. Opus is
+ unmatched for interactive speech and music transmission over the Internet, but
is also intended for storage and streaming applications.
endef
+CONFIGURE_ARGS+= \
+ --disable-doc \
+ --disable-extra-programs
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/opus $(1)/usr/include/
#
-# Copyright (C) 2007 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.
include $(TOPDIR)/rules.mk
PKG_NAME:=protobuf
-PKG_VERSION:=2.5.0
+PKG_VERSION:=2.6.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://protobuf.googlecode.com/files
-PKG_MD5SUM:=a72001a9067a4c2c4e0e836d0f92ece4
+PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION)
+PKG_MD5SUM:=11aaac2d704eef8efd1867a807865d85
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_DEPENDS:=protobuf/host
-PKG_USE_MIPS16:=0
+PKG_USE_MIPS16:=0# MIPS16 prevents protobuf's usage of the 'sync' asm-opcode
PKG_INSTALL:=1
of its internal RPC protocols and file formats.
endef
-define Host/Compile
- $(MAKE) -C $(HOST_BUILD_DIR)
-endef
-
-define Host/Install
- $(MAKE) -C $(HOST_BUILD_DIR) install
-endef
-
-CONFIGURE_ARGS += --with-protoc=$(HOST_BUILD_DIR)/src/protoc
+CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR_HOST)/bin/protoc
define Build/InstallDev
$(INSTALL_DIR) \
---- a/src/google/protobuf/stubs/platform_macros.h
-+++ b/src/google/protobuf/stubs/platform_macros.h
-@@ -49,7 +49,7 @@
- #elif defined(__ARMEL__)
- #define GOOGLE_PROTOBUF_ARCH_ARM 1
- #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
+--- - 2015-05-19 16:27:29.770936016 +0200
++++ protobuf-2.6.1/src/google/protobuf/stubs/platform_macros.h 2015-05-19 13:49:52.115444643 +0200
+@@ -55,7 +55,7 @@
+ #elif defined(__aarch64__)
+ #define GOOGLE_PROTOBUF_ARCH_AARCH64 1
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
-#elif defined(__MIPSEL__)
+#elif defined(__MIPSEL__) || defined(__MIPSEB__)
- #define GOOGLE_PROTOBUF_ARCH_MIPS 1
- #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
- #elif defined(__pnacl__)
+ #if defined(__LP64__)
+ #define GOOGLE_PROTOBUF_ARCH_MIPS64 1
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
--- /dev/null
+--- - 2015-05-19 16:29:09.614344473 +0200
++++ protobuf-2.6.1/src/google/protobuf/stubs/atomicops_internals_mips_gcc.h 2015-05-19 13:49:52.127442746 +0200
+@@ -150,7 +150,7 @@
+ }
+
+ inline void MemoryBarrier() {
+- __asm__ __volatile__("sync" : : : "memory");
++ __asm__ __volatile__(".set mips2; sync; .set mips0" : : : "memory");
+ }
+
+ inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
PKG_NAME:=qrencode
PKG_VERSION:=3.4.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://fukuchi.org/works/qrencode/
PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>
PKG_LICENSE:=LGPL-2.1+
PKG_INSTALL:=1
-PKG:FIXUP:=autoreconf
+PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
---- a/configure.ac
-+++ b/configure.ac
-@@ -58,9 +58,6 @@
- [build_tools=$withval], [build_tools=yes])
-
- AM_CONDITIONAL(BUILD_TOOLS, [test "x$build_tools" = "xyes" ])
--if test x$build_tools = xyes ; then
-- PKG_CHECK_MODULES(png, "libpng")
--fi
-
- dnl --with-tests
- AC_ARG_WITH([tests], [AS_HELP_STRING([--with-tests], [build tests [default=no]])],
--- a/qrenc.c
+++ b/qrenc.c
@@ -25,7 +25,6 @@
if(optind < argc) {
intext = (unsigned char *)argv[optind];
length = strlen((char *)intext);
+--- a/configure.ac
++++ b/configure.ac
+@@ -58,9 +58,6 @@
+ [build_tools=$withval], [build_tools=yes])
+
+ AM_CONDITIONAL(BUILD_TOOLS, [test "x$build_tools" = "xyes" ])
+-if test x$build_tools = xyes ; then
+- PKG_CHECK_MODULES(png, "libpng")
+-fi
+
+ dnl --with-tests
+ AC_ARG_WITH([tests], [AS_HELP_STRING([--with-tests], [build tests [default=no]])],
+@@ -80,12 +77,6 @@
+ echo "/* #undef WITH_TESTS */" >>confdefs.h
+ fi
+
+-if test x$build_tests = xyes ; then
+- SDL_REQUIRED_VERSION=1.2.0
+- AM_PATH_SDL($SDL_REQUIRED_VERSION,,AC_MSG_WARN([*** SDL $SDL_REQUIRED_VERSION or better is required.]))
+- AC_MSG_NOTICE([SDL check done.])
+- AM_ICONV_LINK
+-fi
+ AM_CONDITIONAL(HAVE_SDL, [test "x$SDL_CFLAGS" != "x" ])
+
+
include $(TOPDIR)/rules.mk
PKG_NAME:=sqlite
-PKG_VERSION:=3080803
+PKG_VERSION:=3081002
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-autoconf-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.sqlite.org/2015/
-PKG_MD5SUM:=51272e875879ee893e51070b07c33888
+PKG_MD5SUM:=a18bfc015cd49a1e7a961b7b77bc3b37
PKG_LICENSE:=PUBLICDOMAIN
PKG_LICENSE_FILES:=
select FFMPEG_CUSTOM_DECODER_ape
select FFMPEG_CUSTOM_DECODER_atrac3
select FFMPEG_CUSTOM_DECODER_flac
- select FFMPEG_CUSTOM_SELECT_libopus
select FFMPEG_CUSTOM_DECODER_mp2
select FFMPEG_CUSTOM_DECODER_mp3
select FFMPEG_CUSTOM_DECODER_mpc7
select FFMPEG_CUSTOM_DECODER_mpc8
+ select FFMPEG_CUSTOM_DECODER_opus
select FFMPEG_CUSTOM_DECODER_pcm_s16be
select FFMPEG_CUSTOM_DECODER_pcm_s16le
select FFMPEG_CUSTOM_SELECT_speex
select FFMPEG_CUSTOM_DEMUXER_wv
select FFMPEG_CUSTOM_PARSER_aac
select FFMPEG_CUSTOM_PARSER_aac_latm
- select FFMPEG_CUSTOM_PARSER_flac
select FFMPEG_CUSTOM_PARSER_ac3
+ select FFMPEG_CUSTOM_PARSER_flac
select FFMPEG_CUSTOM_PARSER_mpegaudio
+ select FFMPEG_CUSTOM_PARSER_opus
select FFMPEG_CUSTOM_PROTOCOL_file
select FFMPEG_CUSTOM_PROTOCOL_http
select FFMPEG_CUSTOM_PROTOCOL_rtp
bool "Musepack 8"
select FFMPEG_CUSTOM_DEMUXER_mpc8
+config FFMPEG_CUSTOM_DECODER_opus
+ bool "Opus"
+
config FFMPEG_CUSTOM_DECODER_pcm_s16be
bool "PCM signed 16-bit big-endian"
config FFMPEG_CUSTOM_PARSER_mpeg4video
bool "MPEG-4 Video"
+config FFMPEG_CUSTOM_PARSER_opus
+ bool "Opus"
+
comment "Protocols ---"
config FFMPEG_CUSTOM_PROTOCOL_file
PKG_NAME:=ffmpeg
PKG_VERSION:=2.6.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://ffmpeg.org/releases/
mp3* \
mpc7 \
mpc8 \
+ opus \
pcm_* \
vorbis \
wavpack \
FFMPEG_AUDIO_PARSERS:= \
aac \
aac_latm \
- flac \
ac3 \
+ flac \
mpegaudio \
+ opus \
FFMPEG_AUDIO_PROTOCOLS:= \
file http icecast rtp tcp udp
define Package/libffmpeg-audio-dec
$(call Package/libffmpeg/Default)
TITLE+= (audio)
- DEPENDS+= @DEVEL +libopus +libspeex
+ DEPENDS+= @BUILD_PATENTED +libspeex
VARIANT:=audio-dec
endef
$(call FFMPEG_ENABLE,demuxer,$(FFMPEG_AUDIO_DEMUXERS)) \
$(call FFMPEG_ENABLE,parser,$(FFMPEG_AUDIO_PARSERS)) \
$(call FFMPEG_ENABLE,protocol,$(FFMPEG_AUDIO_PROTOCOLS)) \
- --enable-libopus --enable-decoder=libopus \
--enable-libspeex --enable-decoder=libspeex \
--disable-decoder=pcm_bluray,pcm_dvd \
--- /dev/null
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=bridge-utils
+PKG_VERSION:=1.5
+PKG_RELEASE:=3
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/bridge-utils.git
+PKG_SOURCE_VERSION:=v${PKG_VERSION}
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+
+PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE_FILES:=COPYING
+PKG_FIXUP:=autoreconf
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/bridge
+ SECTION:=net
+ CATEGORY:=Base system
+ TITLE:=Ethernet bridging configuration utility
+ URL:=http://bridge.sourceforge.net/
+ PKG_MAINTAINER:=Nikolay Martynov <mar.kolya@gmail.com>
+endef
+
+define Package/bridge/description
+ Manage ethernet bridging: a way to connect networks together to
+ form a larger network.
+endef
+
+TARGET_CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
+
+CONFIGURE_ARGS += \
+ --with-linux-headers="$(LINUX_DIR)" \
+
+define Package/bridge/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/brctl/brctl $(1)/usr/sbin
+endef
+
+$(eval $(call BuildPackage,bridge))
--- /dev/null
+--- a/libbridge/Makefile.in
++++ b/libbridge/Makefile.in
+@@ -5,7 +5,7 @@ AR=ar
+ RANLIB=@RANLIB@
+
+ CC=@CC@
+-CFLAGS = -Wall -g $(KERNEL_HEADERS)
++CFLAGS = -Wall -g @CFLAGS@ $(KERNEL_HEADERS)
+
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
--- /dev/null
+--- a/libbridge/libbridge.h
++++ b/libbridge/libbridge.h
+@@ -20,6 +20,7 @@
+ #define _LIBBRIDGE_H
+
+ #include <sys/socket.h>
++#include <netinet/in.h>
+ #include <linux/if.h>
+ #include <linux/if_bridge.h>
+
include $(TOPDIR)/rules.mk
PKG_NAME:=clamav
-PKG_VERSION:=0.98.6
+PKG_VERSION:=0.98.7
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://downloads.sourceforge.net/project/clamav/clamav/$(PKG_VERSION)/
-PKG_MD5SUM:=7f4f7e82a09e42c4ebf153d6d452d9d8
+PKG_SOURCE_URL:=http://sourceforge.net/projects/clamav/files/clamav/$(PKG_VERSION)/
+PKG_MD5SUM:=157c601161da1c2d5a0e48ea1b49e067
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_NAME:=emailrelay
PKG_VERSION:=1.9
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz
PKG_SOURCE_URL:=@SF/emailrelay/$(PKG_VERSION)
start() {
logger -t 'emailrelay' "Starting emailrelay service."
- service_start emailrelay --as-server --poll 60 --forward-to smtpserver:smtpport --spool-dir /tmp --client-tls --client-auth /etc/emailrelay.auth --server-auth /etc/emailrelay.auth --log
+ service_start /usr/bin/emailrelay --as-server --poll 60 --forward-to smtpserver:smtpport --spool-dir /tmp --client-tls --client-auth /etc/emailrelay.auth --server-auth /etc/emailrelay.auth --log
}
stop() {
logger -t 'emailrelay' "Stopping emailrelay service."
- killall -9 emailrelay
+ service_stop /usr/bin/emailrelay
}
PKG_RELEASE:=1
PKG_SOURCE:=freeradius-server-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=ftp://ftp.freeradius.org/pub/freeradius/
+PKG_SOURCE_URL:=\
+ ftp://ftp.freeradius.org/pub/freeradius/ \
+ ftp://ftp.freeradius.org/pub/freeradius/old/
PKG_MD5SUM:=b84b9ffa1ac9b20b2643e5a08ac483a1
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=GPL-2.0
PKG_NAME:=fwknop
PKG_VERSION:=2.6.6
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.cipherdyne.org/fwknop/download
--- /dev/null
+diff --git a/CREDITS b/CREDITS
+index de17d9e..38e2108 100644
+--- a/CREDITS
++++ b/CREDITS
+@@ -1,5 +1,6 @@
+ Jonathan Bennett
+ - Contributed OpenWRT support - see the extras/openwrt/ directory.
++ - Suggested the addition of the --key-gen option to fwknopd.
+
+ Sebastien Jeanquier
+ - Assisted with getting fwknop included in BackTrack Linux - the choice
+diff --git a/ChangeLog b/ChangeLog
+index 21a5093..4daf008 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,8 @@
++fwknop-2.6.7 (05//2015):
++ - Added --key-gen to fwknopd. This feature was suggested by Jonathan
++ Bennett, and will help with ease of use efforts. The first platform to
++ take advantage of this will likely be OpenWRT thanks to Jonathan.
++
+ fwknop-2.6.6 (04/23/2015):
+ - [server] Add the ability for fwknopd to function as an generic SPA
+ gateway. This allows scenarios such as the fwknopd system providing DHCP
+diff --git a/client/config_init.c b/client/config_init.c
+index cdb233d..f0ae135 100644
+--- a/client/config_init.c
++++ b/client/config_init.c
+@@ -199,7 +199,7 @@ static int critical_var_array[] =
+ };
+
+ /**
+- * @brief Generate Rijndael + HMAC keys from /dev/random (base64 encoded) and exit.
++ * @brief Generate Rijndael + HMAC keys from /dev/urandom (base64 encoded).
+ *
+ * @param options FKO command line option structure
+ */
+diff --git a/client/fwknop_common.h b/client/fwknop_common.h
+index aef20c4..c57db02 100644
+--- a/client/fwknop_common.h
++++ b/client/fwknop_common.h
+@@ -69,8 +69,6 @@
+ #define MAX_HOSTNAME_LEN 70
+ #define MAX_URL_HOST_LEN 256
+ #define MAX_URL_PATH_LEN 1024
+-#define MAX_KEY_LEN 128
+-#define MAX_B64_KEY_LEN 180
+
+ /* fwknop client configuration parameters and values
+ */
+@@ -156,10 +154,10 @@ typedef struct fko_cli_options
+ unsigned char use_gpg;
+ unsigned char use_gpg_agent;
+ unsigned char gpg_no_signing_pw;
++ unsigned char key_gen;
+ int time_offset_plus;
+ int time_offset_minus;
+ int fw_timeout;
+- int key_gen;
+
+ char use_rc_stanza[MAX_LINE_LEN];
+ unsigned char got_named_stanza;
+diff --git a/common/common.h b/common/common.h
+index b63e7c2..c7b2e57 100644
+--- a/common/common.h
++++ b/common/common.h
+@@ -157,6 +157,9 @@ enum {
+ #define MAX_GPG_KEY_ID 128
+ #define MAX_USERNAME_LEN 30
+
++#define MAX_KEY_LEN 128
++#define MAX_B64_KEY_LEN 180
++
+ /* Command line argument / argv handling
+ */
+ #define MAX_CMDLINE_ARGS 30 /*!< should be way more than enough */
+diff --git a/doc/fwknop.man.asciidoc b/doc/fwknop.man.asciidoc
+index 070ac77..efa99a7 100644
+--- a/doc/fwknop.man.asciidoc
++++ b/doc/fwknop.man.asciidoc
+@@ -196,6 +196,11 @@ GENERAL OPTIONS
+ keys are generally more secure than passphrases that are typed in from the
+ command line.
+
++*--key-gen-file*='<file>'::
++ Write generated keys to the specified file. Note that the file is
++ overwritten if it already exists. If this option is not given, then
++ *--key-gen* writes the keys to stdout.
++
+ *--key-len*='<length>'::
+ Specify the number of bytes for a generated Rijndael key. The maximum size
+ is currently 128 bytes.
+diff --git a/server/cmd_opts.h b/server/cmd_opts.h
+index bc1eee1..d7a645c 100644
+--- a/server/cmd_opts.h
++++ b/server/cmd_opts.h
+@@ -141,6 +141,10 @@ enum {
+ FW_LIST = 0x200,
+ FW_LIST_ALL,
+ FW_FLUSH,
++ KEY_GEN_FILE,
++ KEY_LEN,
++ HMAC_KEY_LEN,
++ HMAC_DIGEST_TYPE,
+ AFL_PKT_FILE,
+ GPG_HOME_DIR,
+ GPG_EXE_PATH,
+@@ -178,7 +182,12 @@ static struct option cmd_opts[] =
+ {"fault-injection-tag", 1, NULL, FAULT_INJECTION_TAG},
+ {"help", 0, NULL, 'h'},
+ {"interface", 1, NULL, 'i'},
+- {"kill", 0, NULL, 'K'},
++ {"key-gen", 0, NULL, 'k'},
++ {"key-gen-file", 1, NULL, KEY_GEN_FILE },
++ {"key-len", 1, NULL, KEY_LEN },
++ {"hmac-key-len", 1, NULL, HMAC_KEY_LEN },
++ {"hmac-digest-type", 1, NULL, HMAC_DIGEST_TYPE },
++ {"kill", 0, NULL, 'K' },
+ {"fw-flush", 0, NULL, FW_FLUSH },
+ {"fw-list", 0, NULL, FW_LIST },
+ {"fw-list-all", 0, NULL, FW_LIST_ALL },
+diff --git a/server/config_init.c b/server/config_init.c
+index 0ddceee..2f1d293 100644
+--- a/server/config_init.c
++++ b/server/config_init.c
+@@ -201,6 +201,69 @@ validate_int_var_ranges(fko_srv_options_t *opts)
+ return;
+ }
+
++/**
++ * @brief Generate Rijndael + HMAC keys from /dev/urandom (base64 encoded).
++ *
++ * @param options FKO command line option structure
++ */
++static void
++generate_keys(fko_srv_options_t *options)
++{
++ char key_base64[MAX_B64_KEY_LEN+1];
++ char hmac_key_base64[MAX_B64_KEY_LEN+1];
++
++ FILE *key_gen_file_ptr = NULL;
++ int res;
++
++ /* Set defaults and validate for --key-gen mode
++ */
++ if(options->key_len == 0)
++ options->key_len = FKO_DEFAULT_KEY_LEN;
++
++ if(options->hmac_key_len == 0)
++ options->hmac_key_len = FKO_DEFAULT_HMAC_KEY_LEN;
++
++ if(options->hmac_type == 0)
++ options->hmac_type = FKO_DEFAULT_HMAC_MODE;
++
++ /* Zero out the key buffers */
++ memset(key_base64, 0x00, sizeof(key_base64));
++ memset(hmac_key_base64, 0x00, sizeof(hmac_key_base64));
++
++ /* Generate the key through libfko */
++ res = fko_key_gen(key_base64, options->key_len,
++ hmac_key_base64, options->hmac_key_len,
++ options->hmac_type);
++
++ if(res != FKO_SUCCESS)
++ {
++ log_msg(LOG_ERR, "%s: fko_key_gen: Error %i - %s",
++ MY_NAME, res, fko_errstr(res));
++ clean_exit(options, NO_FW_CLEANUP, EXIT_FAILURE);
++ }
++
++ if(options->key_gen_file[0] != '\0')
++ {
++ if ((key_gen_file_ptr = fopen(options->key_gen_file, "w")) == NULL)
++ {
++ log_msg(LOG_ERR, "Unable to create key gen file: %s: %s",
++ options->key_gen_file, strerror(errno));
++ clean_exit(options, NO_FW_CLEANUP, EXIT_FAILURE);
++ }
++ fprintf(key_gen_file_ptr, "KEY_BASE64: %s\nHMAC_KEY_BASE64: %s\n",
++ key_base64, hmac_key_base64);
++ fclose(key_gen_file_ptr);
++ fprintf(stdout, "[+] Wrote Rijndael and HMAC keys to: %s",
++ options->key_gen_file);
++ }
++ else
++ {
++ fprintf(stdout, "KEY_BASE64: %s\nHMAC_KEY_BASE64: %s\n",
++ key_base64, hmac_key_base64);
++ }
++ clean_exit(options, NO_FW_CLEANUP, EXIT_SUCCESS);
++}
++
+ /* Parse the config file...
+ */
+ static void
+@@ -427,7 +490,7 @@ validate_options(fko_srv_options_t *opts)
+ if(opts->config[CONF_ENABLE_DIGEST_PERSISTENCE] == NULL)
+ set_config_entry(opts, CONF_ENABLE_DIGEST_PERSISTENCE,
+ DEF_ENABLE_DIGEST_PERSISTENCE);
+-
++
+ /* Enable destination rule.
+ */
+ if(opts->config[CONF_ENABLE_DESTINATION_RULE] == NULL)
+@@ -928,8 +991,9 @@ config_init(fko_srv_options_t *opts, int argc, char **argv)
+
+ /* First, scan the command-line args for -h/--help or an alternate
+ * configuration file. If we find an alternate config file, use it,
+- * otherwise use the default. We also grab any override config files
+- * as well.
++ * otherwise use the default. We also grab any override config files
++ * as well. In addition, we handle key generation here since this is
++ * independent of configuration parsing.
+ */
+ while ((cmd_arg = getopt_long(argc, argv,
+ GETOPTS_OPTION_STRING, cmd_opts, &index)) != -1) {
+@@ -952,6 +1016,45 @@ config_init(fko_srv_options_t *opts, int argc, char **argv)
+ if(got_override_config > 0)
+ break;
+
++ case 'k':
++ opts->key_gen = 1;
++ break;
++ case KEY_GEN_FILE:
++ opts->key_gen = 1;
++ strlcpy(opts->key_gen_file, optarg, sizeof(opts->key_gen_file));
++ break;
++ case KEY_LEN: /* used in --key-gen mode only */
++ opts->key_len = strtol_wrapper(optarg, 1,
++ MAX_KEY_LEN, NO_EXIT_UPON_ERR, &is_err);
++ if(is_err != FKO_SUCCESS)
++ {
++ log_msg(LOG_ERR,
++ "Invalid key length '%s', must be in [%d-%d]",
++ optarg, 1, MAX_KEY_LEN);
++ clean_exit(opts, NO_FW_CLEANUP, EXIT_FAILURE);
++ }
++ break;
++ case HMAC_DIGEST_TYPE: /* used in --key-gen mode only */
++ if((opts->hmac_type = hmac_digest_strtoint(optarg)) < 0)
++ {
++ log_msg(LOG_ERR,
++ "* Invalid hmac digest type: %s, use {md5,sha1,sha256,sha384,sha512}",
++ optarg);
++ clean_exit(opts, NO_FW_CLEANUP, EXIT_FAILURE);
++ }
++ break;
++ case HMAC_KEY_LEN: /* used in --key-gen mode only */
++ opts->hmac_key_len = strtol_wrapper(optarg, 1,
++ MAX_KEY_LEN, NO_EXIT_UPON_ERR, &is_err);
++ if(is_err != FKO_SUCCESS)
++ {
++ log_msg(LOG_ERR,
++ "Invalid hmac key length '%s', must be in [%d-%d]",
++ optarg, 1, MAX_KEY_LEN);
++ clean_exit(opts, NO_FW_CLEANUP, EXIT_FAILURE);
++ }
++ break;
++
+ /* Look for override configuration file arg.
+ */
+ case 'O':
+@@ -965,6 +1068,9 @@ config_init(fko_srv_options_t *opts, int argc, char **argv)
+ }
+ }
+
++ if(opts->key_gen)
++ generate_keys(opts);
++
+ /* If no alternate configuration file was specified, we use the
+ * default.
+ */
+diff --git a/server/fwknopd_common.h b/server/fwknopd_common.h
+index ecf2a81..8c33eaa 100644
+--- a/server/fwknopd_common.h
++++ b/server/fwknopd_common.h
+@@ -585,10 +585,14 @@ typedef struct fko_srv_options
+ unsigned char fw_list; /* List current firewall rules */
+ unsigned char fw_list_all; /* List all current firewall rules */
+ unsigned char fw_flush; /* Flush current firewall rules */
++ unsigned char key_gen; /* Generate keys and exit */
++ unsigned char exit_after_parse_config; /* Parse config and exit */
++
++ /* Operational flags
++ */
+ unsigned char test; /* Test mode flag */
+ unsigned char afl_fuzzing; /* SPA pkts from stdin for AFL fuzzing */
+ unsigned char verbose; /* Verbose mode flag */
+- unsigned char exit_after_parse_config; /* Parse config and exit */
+ unsigned char enable_udp_server; /* Enable UDP server mode */
+
+ unsigned char firewd_disable_check_support; /* Don't use firewall-cmd ... -C */
+@@ -605,6 +609,13 @@ typedef struct fko_srv_options
+ int tcp_server_pid;
+ int lock_fd;
+
++ /* Values used in --key-gen mode only
++ */
++ char key_gen_file[MAX_PATH_LEN];
++ int key_len;
++ int hmac_key_len;
++ int hmac_type;
++
+ #if USE_FILE_CACHE
+ struct digest_cache_list *digest_cache; /* In-memory digest cache list */
+ #endif
+diff --git a/test/tests/basic_operations.pl b/test/tests/basic_operations.pl
+index f4dde2e..76a509d 100644
+--- a/test/tests/basic_operations.pl
++++ b/test/tests/basic_operations.pl
+@@ -390,6 +390,14 @@
+ 'exec_err' => $YES,
+ 'cmdline' => "$default_client_args --key-gen -K " . 'A'x1030
+ },
++ {
++ 'category' => 'basic operations',
++ 'subcategory' => 'server',
++ 'detail' => '--key-gen file path (-K) too long',
++ 'function' => \&generic_exec,
++ 'exec_err' => $YES,
++ 'cmdline' => "$fwknopdCmd --key-gen --key-gen-file " . 'A'x1030
++ },
+
+ {
+ 'category' => 'basic operations',
+diff --git a/test/tests/rijndael.pl b/test/tests/rijndael.pl
+index 26aab6a..34af65e 100644
+--- a/test/tests/rijndael.pl
++++ b/test/tests/rijndael.pl
+@@ -421,33 +421,6 @@
+ 'key_file' => $cf{'rc_named_key'},
+ },
+
+- ### --key-gen tests
+- {
+- 'category' => 'Rijndael',
+- 'subcategory' => 'client',
+- 'detail' => '--key-gen',
+- 'function' => \&generic_exec,
+- 'cmdline' => "$fwknopCmd --key-gen",
+- 'positive_output_matches' => [qr/^KEY_BASE64\:?\s\S{10}/,
+- qw/HMAC_KEY_BASE64\:?\s\S{10}/],
+- },
+- {
+- 'category' => 'Rijndael',
+- 'subcategory' => 'client',
+- 'detail' => "--key-gen $uniq_keys key uniqueness",
+- 'function' => \&key_gen_uniqueness,
+- 'cmdline' => "$fwknopCmd --key-gen", ### no valgrind string (too slow for 100 client exec's)
+- 'disable_valgrind' => $YES,
+- },
+- {
+- 'category' => 'Rijndael',
+- 'subcategory' => 'client',
+- 'detail' => '--key-gen to file',
+- 'function' => \&generic_exec,
+- 'cmdline' => "$fwknopCmd --key-gen --key-gen-file $key_gen_file",
+- 'positive_output_matches' => [qr/Wrote.*\skeys/],
+- },
+-
+ ### rc file tests
+ {
+ 'category' => 'Rijndael',
+diff --git a/test/tests/rijndael_hmac.pl b/test/tests/rijndael_hmac.pl
+index fc1a8af..fd80f04 100644
+--- a/test/tests/rijndael_hmac.pl
++++ b/test/tests/rijndael_hmac.pl
+@@ -58,6 +58,59 @@
+ 'exec_err' => $YES,
+ },
+
++ ### --key-gen tests
++ {
++ 'category' => 'Rijndael+HMAC',
++ 'subcategory' => 'client',
++ 'detail' => '--key-gen',
++ 'function' => \&generic_exec,
++ 'cmdline' => "$fwknopCmd --key-gen",
++ 'positive_output_matches' => [qr/^KEY_BASE64\:?\s\S{10}/,
++ qw/HMAC_KEY_BASE64\:?\s\S{10}/],
++ },
++ {
++ 'category' => 'Rijndael+HMAC',
++ 'subcategory' => 'server',
++ 'detail' => '--key-gen',
++ 'function' => \&generic_exec,
++ 'cmdline' => "$fwknopdCmd --key-gen",
++ 'positive_output_matches' => [qr/^KEY_BASE64\:?\s\S{10}/,
++ qw/HMAC_KEY_BASE64\:?\s\S{10}/],
++ },
++ {
++ 'category' => 'Rijndael+HMAC',
++ 'subcategory' => 'client',
++ 'detail' => "--key-gen $uniq_keys key uniqueness",
++ 'function' => \&key_gen_uniqueness,
++ 'cmdline' => "$fwknopCmd --key-gen", ### no valgrind string (too slow for 100 exec's)
++ 'disable_valgrind' => $YES,
++ },
++ {
++ 'category' => 'Rijndael+HMAC',
++ 'subcategory' => 'server',
++ 'detail' => "--key-gen $uniq_keys key uniqueness",
++ 'function' => \&key_gen_uniqueness,
++ 'cmdline' => "$fwknopdCmd --key-gen", ### no valgrind string (too slow for 100 exec's)
++ 'disable_valgrind' => $YES,
++ },
++ {
++ 'category' => 'Rijndael+HMAC',
++ 'subcategory' => 'client',
++ 'detail' => '--key-gen to file',
++ 'function' => \&generic_exec,
++ 'cmdline' => "$fwknopCmd --key-gen --key-gen-file $key_gen_file",
++ 'positive_output_matches' => [qr/Wrote.*\skeys/],
++ },
++ {
++ 'category' => 'Rijndael+HMAC',
++ 'subcategory' => 'server',
++ 'detail' => '--key-gen to file',
++ 'function' => \&generic_exec,
++ 'cmdline' => "$fwknopdCmd --key-gen --key-gen-file $key_gen_file",
++ 'positive_output_matches' => [qr/Wrote.*\skeys/],
++ },
++
++ ### complete cycle tests
+ {
+ 'category' => 'Rijndael+HMAC',
+ 'subcategory' => 'client+server',
#
-# Copyright (C) 2006-2011 OpenWrt.org
+# Copyright (C) 2006-2015 OpenWrt.org
# 2014 Noah Meyerhans <frodo@morgul.net>
#
# This is free software, licensed under the GNU General Public License v2.
PKG_NAME:=ipsec-tools
PKG_VERSION:=0.8.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_MAINTAINER := "Noah Meyerhans <frodo@morgul.net>"
PKG_LICENSE := BSD-3-Clause
#if defined(__APPLE__) && defined(__MACH__)
#include <util.h>
#endif
-@@ -1661,7 +1661,8 @@ isakmp_cfg_accounting_system(port, raddr
+@@ -1664,7 +1664,8 @@ isakmp_cfg_accounting_system(port, raddr
int inout;
{
int error = 0;
char addr[NI_MAXHOST];
if (usr == NULL || usr[0]=='\0') {
-@@ -1670,34 +1671,37 @@ isakmp_cfg_accounting_system(port, raddr
+@@ -1673,34 +1674,37 @@ isakmp_cfg_accounting_system(port, raddr
return -1;
}
--- a/src/racoon/ipsec_doi.c
+++ b/src/racoon/ipsec_doi.c
-@@ -3582,8 +3582,8 @@ ipsecdoi_checkid1(iph1)
+@@ -3581,8 +3581,8 @@ ipsecdoi_checkid1(iph1)
iph1->approval->authmethod == OAKLEY_ATTR_AUTH_METHOD_PSKEY) {
if (id_b->type != IPSECDOI_ID_IPV4_ADDR
&& id_b->type != IPSECDOI_ID_IPV6_ADDR) {
--- /dev/null
+--- a/configure.ac
++++ b/configure.ac
+@@ -732,7 +732,8 @@ case $host in
+ ],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE([HAVE_POLICY_FWD], [], [Have forward policy])],
+- [AC_MSG_RESULT(no)])
++ [AC_MSG_RESULT(forced)
++ AC_DEFINE([HAVE_POLICY_FWD], [], [Have forward policy])])
+ ;;
+ *)
+ AC_MSG_RESULT(no)
--- /dev/null
+Fix null dereference in racoon/gssapi.c (CVE-2015-4047)
+
+--- a/src/racoon/gssapi.c
++++ b/src/racoon/gssapi.c
+@@ -192,6 +192,11 @@ gssapi_init(struct ph1handle *iph1)
+ gss_name_t princ, canon_princ;
+ OM_uint32 maj_stat, min_stat;
+
++ if (iph1->rmconf == NULL) {
++ plog(LLV_ERROR, LOCATION, NULL, "no remote config\n");
++ return -1;
++ }
++
+ gps = racoon_calloc(1, sizeof (struct gssapi_ph1_state));
+ if (gps == NULL) {
+ plog(LLV_ERROR, LOCATION, NULL, "racoon_calloc failed\n");
+++ /dev/null
-diff --git a/configure.ac b/configure.ac
-index 8506245..eca8895 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -724,7 +724,8 @@ case $host in
- ],
- [AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_POLICY_FWD], [], [Have forward policy])],
-- [AC_MSG_RESULT(no)])
-+ [AC_MSG_RESULT(forced)
-+ AC_DEFINE([HAVE_POLICY_FWD], [], [Have forward policy])])
- ;;
- *)
- AC_MSG_RESULT(no)
include $(TOPDIR)/rules.mk
PKG_NAME:=lftp
-PKG_VERSION:=4.6.0
+PKG_VERSION:=4.6.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=http://lftp.yar.ru/ftp \ http://lftp.cybermirror.org \ http://lftp.cybermirror.org/old
-PKG_MD5SUM:=fc5f4e3b45c9011a193eb8c0c12eb2eb
+PKG_SOURCE_URL:=http://lftp.yar.ru/ftp \
+ http://lftp.yar.ru/ftp/old \
+ http://lftp.cybermirror.org \
+ http://lftp.cybermirror.org/old
+PKG_MD5SUM:=487c064ee1bd732e5f95928e530435a8
+
+
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING
--- /dev/null
+#
+# 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:=netdiscover
+PKG_VERSION:=0.3-pre-beta7
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-LINUXONLY.tar.gz
+PKG_SOURCE_URL:=http://nixgeneration.com/~jaime/netdiscover/releases/
+PKG_MD5SUM:=8780e66d00496e933b4064cfe9ae61da
+PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/netdiscover
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+libpcap +libnet-1.2.x +libpthread
+ TITLE:=An active/passive address reconnaissance tool
+ URL:=http://nixgeneration.com/~jaime/netdiscover/
+endef
+
+CONFIGURE_VARS+= \
+ CPPFLAGS="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libnet-1.2.x/lib" \
+ LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/libnet-1.2.x/lib"
+
+define Package/netdiscover/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdiscover $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,netdiscover))
PKG_NAME:=ntp
PKG_VERSION:=4.2.8p2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
--enable-NMEA \
--enable-LOCAL-CLOCK \
--enable-SHM \
+ --enable-ATOM \
--enable-linuxcaps \
--with-yielding-select=yes \
--with-crypto \
include $(TOPDIR)/rules.mk
PKG_NAME:=ocserv
-PKG_VERSION:=0.10.4
+PKG_VERSION:=0.10.5
PKG_RELEASE:=1
PKG_BUILD_DIR :=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/ocserv/
-PKG_MD5SUM:=6df31778642320ea7b90f314c4c9a897
+PKG_MD5SUM:=17ee861f352d6ef7cd33114819b215ba
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=COPYING
test $auth = "plain" && authsuffix="\[passwd=/var/etc/ocpasswd\]"
dyndns="false"
- hostname=`uci show ddns|grep domain|head -1|cut -d '=' -f 2 2>/dev/null`
+ hostname=`uci show ddns 2>/dev/null|grep domain|head -1|cut -d '=' -f 2`
[ -n "$hostname" ] && dyndns="true"
mkdir -p /var/etc
local password
config_get name $1 name
- config_get group $1 group
+ config_get group $1 group '*'
config_get password $1 password
- [ -z "$group" ] && group='*'
[ -z "$name" -o -z "$password" ] && return
echo "$name:$group:$password" >> /var/etc/ocpasswd
start() {
local hostname iface
- hostname=`uci show ddns|grep domain|head -1|cut -d '=' -f 2 2>/dev/null`
+ hostname=`uci show ddns 2>/dev/null|grep domain|head -1|cut -d '=' -f 2`
[ -z "$hostname" ] && hostname=`uci get system.@system[0].hostname 2>/dev/null`
[ -f /etc/config/ocserv-dir/ca-key.pem ] && mv /etc/config/ocserv-dir/ca-key.pem /etc/ocserv/ca-key.pem
PKG_NAME:=openvswitch
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_VERSION:=2.3.90
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_LICENSE:=Apache-2.0
--- /dev/null
+From 5919cb26c631b1dd77a745a3c546f9d117ed34b3 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Sat, 23 May 2015 18:12:09 +0200
+Subject: [PATCH] datapath: do not add vlan_hwaccel_push_inside() for kernel >=
+ 3.18.13
+
+The vlan_hwaccel_push_inside() function was backported in this commit
+to kernel 3.18.13:
+
+commit a67e2e88342accd49587d9bad72f6dabd7673f7c
+Author: Jiri Pirko <jiri@resnulli.us>
+Date: Wed Nov 19 14:04:59 2014 +0100
+
+ vlan: introduce *vlan_hwaccel_push_inside helpers
+
+ [ Upstream commit 5968250c868ceee680aa77395b24e6ddcae17d36 ]
+
+Without this patch compilation breaks on kernel >= 3.18.13
+
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ datapath/linux/compat/include/linux/if_vlan.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/datapath/linux/compat/include/linux/if_vlan.h
++++ b/datapath/linux/compat/include/linux/if_vlan.h
+@@ -52,7 +52,7 @@ static inline struct sk_buff *rpl_vlan_i
+ }
+ #endif
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,13)
+ /*
+ * __vlan_hwaccel_push_inside - pushes vlan tag to the payload
+ * @skb: skbuff to tag
PKG_NAME:=radicale
PKG_VERSION:=0.10
-PKG_RELEASE:=1
-PKG_MAINTAINER:=Christian Schoenebeck <chris5560@web.de>
+PKG_RELEASE:=2
+PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
# Value: None | htpasswd | IMAP | LDAP | PAM | courier | http | remote_user | custom
# Default: None
# if setting 'htpasswd' the file /etc/radicale/users is used (hardcoded)
-# option type 'htpasswd'
# Htpasswd encryption method
# Value: plain | sha1 | ssha | crypt
# Value: None | authenticated | owner_only | owner_write | from_file | custom
# Default: None
# if setting 'from_file' the file /etc/radicale/rights is used (hardcoded)
-# option type 'from_file'
# Custom rights handler
# option custom_handler ''
# only (re-)start on ifup
[ "$ACTION" = "ifup" ] || exit 0
-_PID=$(ps | grep '[p]ython.*[r]adicale' 2>/dev/null | awk '{print \$1}')
+_PID=$(ps | grep '[p]ython.*[r]adicale' 2>/dev/null | awk '{print $1}')
kill -1 $_PID 2>/dev/null
if [ $? -eq 0 ]; then
# only restart if already running
local _PID=$(eval "$PGREP")
[ -z "$_PID" ] && return 0 # not running
kill -15 $_PID 2>/dev/null
- sleep 1 # give time to shutdown
+ sleep 3 # give time to shutdown
local _tmp=$(eval "$PGREP")
if [ -z "$_tmp" ]; then
logger -p user.notice -t "radicale[$_PID]" "Service shutdown successfully"
config_get localaddress $1 localaddress "*"
config_get localport $1 localport
- [ "$remoteport" -gt 0 ] || append_string "error" "[tunnelD: $1]remoteport must be a positive integer" "; "
[ "$localport" -gt 0 ] || append_string "error" "[tunnelD: $1]localport must be a positive integer" "; "
[ -n "$error" ] && return 1
#
-# Copyright (C) 2009-2014 OpenWrt.org
+# Copyright (C) 2009-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:=umurmur
-PKG_VERSION:=0.2.15
+PKG_VERSION:=0.2.16
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=git://github.com/fatbob313/umurmur.git
+PKG_SOURCE_URL:=git://github.com/umurmur/umurmur.git
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=f66c0c3d630aaff1c4d589bc4d884067f00b6529
+PKG_SOURCE_VERSION:=0.2.16
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
--- /dev/null
+diff --git a/src/ssli_polarssl.c b/src/ssli_polarssl.c
+index a36ccb6..167637b 100644
+--- a/src/ssli_polarssl.c
++++ b/src/ssli_polarssl.c
+@@ -225,8 +225,12 @@ void SSLi_init(void)
+ Log_fatal("Cannot open /dev/urandom");
+ #endif
+
++#ifdef POLARSSL_VERSION_FEATURES
+ version_get_string(verstring);
+ Log_info("PolarSSL library version %s initialized", verstring);
++#else
++ Log_info("PolarSSL library initialized");
++#endif
+ }
+
+ void SSLi_deinit(void)
#
-# Copyright (C) 2006-2014 OpenWrt.org
+# Copyright (C) 2006-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:=xl2tpd
-PKG_VERSION:=1.3.7pre20141126
+PKG_VERSION:=1.3.7pre20150524
PKG_RELEASE:=1
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
-
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/xelerance/xl2tpd.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
TITLE:=An L2TP (Layer 2 Tunneling Protocol) daemon
URL:=http://www.xelerance.com/software/xl2tpd/
SUBMENU:=VPN
- DEPENDS:=+ppp-mod-pppol2tp +ip +resolveip
+ DEPENDS:=+ppp-mod-pppol2tp +resolveip
endef
define Package/xl2tpd/description
proto_config_add_string "server"
available=1
no_device=1
+ no_proto_task=1
}
proto_l2tp_setup() {
- local config="$1"
- local iface="$2"
- local optfile="/tmp/l2tp/options.${config}"
+ local interface="$1"
+ local optfile="/tmp/l2tp/options.${interface}"
local ip serv_addr server
json_get_var server server && {
for ip in $(resolveip -t 5 "$server"); do
- ( proto_add_host_dependency "$config" "$ip" )
+ ( proto_add_host_dependency "$interface" "$ip" )
serv_addr=1
done
}
[ -n "$serv_addr" ] || {
- echo "Could not resolve server address"
+ echo "Could not resolve server address" >&2
sleep 5
- proto_setup_failed "$config"
+ proto_setup_failed "$interface"
exit 1
}
if [ ! -p /var/run/xl2tpd/l2tp-control ]; then
/etc/init.d/xl2tpd start
+
+ local wait_timeout=0
+ while [ ! -p /var/run/xl2tpd/l2tp-control ]; do
+ wait_timeout=$(($wait_timeout + 1))
+ [ "$wait_timeout" -gt 5 ] && {
+ echo "Cannot find xl2tpd control file." >&2
+ proto_setup_failed "$interface"
+ exit 1
+ }
+ sleep 1
+ done
fi
+ local ipv6 demand keepalive username password pppd_options
json_get_vars ipv6 demand keepalive username password pppd_options
[ "$ipv6" = 1 ] || ipv6=""
if [ "${demand:-0}" -gt 0 ]; then
demand="persist"
fi
+ local mtu
[ -n "$mtu" ] || json_get_var mtu mtu
local interval="${keepalive##*[, ]}"
echo "usepeerdns" >> "${optfile}"
echo "nodefaultroute" >> "${optfile}"
echo "${username:+user \"$username\" password \"$password\"}" >> "${optfile}"
- echo "ipparam \"$config\"" >> "${optfile}"
- echo "ifname \"l2tp-$config\"" >> "${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:++ipv6} ${pppd_options}" >> "${optfile}"
echo "${mtu:+mtu $mtu mru $mtu}" >> "${optfile}"
- xl2tpd-control add l2tp-${config} pppoptfile=${optfile} lns=${server} redial=yes redial timeout=20
- xl2tpd-control connect l2tp-${config}
+ xl2tpd-control add l2tp-${interface} pppoptfile=${optfile} lns=${server} redial=yes redial timeout=20 || {
+ echo "xl2tpd-control: Add l2tp-$interface failed" >&2
+ proto_setup_failed "$interface"
+ exit 1
+ }
+ xl2tpd-control connect l2tp-${interface} || {
+ echo "xl2tpd-control: Connect l2tp-$interface failed" >&2
+ proto_setup_failed "$interface"
+ exit 1
+ }
}
proto_l2tp_teardown() {
local interface="$1"
local optfile="/tmp/l2tp/options.${interface}"
+ rm -f ${optfile}
case "$ERROR" in
11|19)
proto_notify_error "$interface" AUTH_FAILED
;;
esac
- xl2tpd-control disconnect l2tp-${interface}
+ if [ -p /var/run/xl2tpd/l2tp-control ]; then
+ xl2tpd-control remove l2tp-${interface} || {
+ echo "xl2tpd-control: Remove l2tp-$interface failed" >&2
+ }
+ fi
# Wait for interface to go down
while [ -d /sys/class/net/l2tp-${interface} ]; do
sleep 1
done
-
- xl2tpd-control remove l2tp-${interface}
- rm -f ${optfile}
}
[ -n "$INCLUDE_ONLY" ] || {
#!/bin/sh /etc/rc.common
-# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006-2015 OpenWrt.org
START=60
+USE_PROCD=1
+
BIN=xl2tpd
-DEFAULT=/etc/default/$BIN
-RUN_D=/var/run
-PID_F=$RUN_D/$BIN.pid
+RUN_D="/var/run/xl2tpd"
+PID_F="/var/run/xl2tpd.pid"
+
+start_service() {
+ rm -rf "$RUN_D"
+ mkdir -p "$RUN_D"
-start() {
- mkdir -p $RUN_D/$BIN
- [ -f $DEFAULT ] && . $DEFAULT
- $BIN $OPTIONS
+ procd_open_instance
+ procd_set_param command $BIN -D -l -p "$PID_F"
+ procd_close_instance
}
-stop() {
- [ -f $PID_F ] && kill $(cat $PID_F)
+stop_service() {
+ rm -rf "$RUN_D"
+ rm -rf "$PID_F"
}
--- /dev/null
+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
+
+++ /dev/null
-From 8c5853b8e22f34bc1c1acba278f7850ab7946894 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Tue, 28 Apr 2015 21:26:15 +0800
-Subject: [PATCH 1/7] xl2tpd-control: check end-of-file when reading pipe to
- avoid dead loop.
-
----
- xl2tpd-control.c | 11 +++++++----
- 1 file changed, 7 insertions(+), 4 deletions(-)
-
---- a/xl2tpd-control.c
-+++ b/xl2tpd-control.c
-@@ -306,17 +306,20 @@ int read_result(int result_fd, char* buf
- /*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 */
--- /dev/null
+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
+
+++ /dev/null
-From 76f444d284c0b0a351a488954e0d39b72a0ce211 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Wed, 29 Apr 2015 10:32:37 +0800
-Subject: [PATCH 2/7] xl2tpd-control: define _GNU_SOURCE to use fmemopen() and
- friends.
-
----
- xl2tpd-control.c | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/xl2tpd-control.c
-+++ b/xl2tpd-control.c
-@@ -10,6 +10,8 @@
- *
- */
-
-+#define _GNU_SOURCE
-+
- #include <stdio.h>
- #include <string.h>
- #include <stdarg.h>
--- /dev/null
+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
+
--- /dev/null
+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
+
+++ /dev/null
-From f7cfd36b8a93afd326c0d9378e99576c616bd3fc Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Wed, 29 Apr 2015 14:21:12 +0800
-Subject: [PATCH 3/7] 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(-)
-
---- 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)
+++ /dev/null
-From 7a343f7b79b70a8e7e04b2bd465d344ad0ef4c49 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Wed, 29 Apr 2015 16:30:17 +0800
-Subject: [PATCH 4/7] start_pppd: place opts after "plugin pppol2tp.so".
-
-so that plugin options like pppol2tp_debug_mark can be recognized by pppd.
----
- xl2tpd.c | 21 ++++++++++-----------
- 1 file changed, 10 insertions(+), 11 deletions(-)
-
---- a/xl2tpd.c
-+++ b/xl2tpd.c
-@@ -382,7 +382,6 @@ int start_pppd (struct call *c, struct p
- /* 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 p
- 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 p
- snprintf (stropt[pos], 10, "%d", c->ourcid);
- pos++;
- }
-- stropt[pos] = NULL;
- }
- else
- #endif
-@@ -497,6 +486,16 @@ int start_pppd (struct call *c, struct p
- return -EINVAL;
- }
- stropt[pos++] = strdup(tty);
-+ }
-+
-+ {
-+ struct ppp_opts *p = opts;
-+ while (p)
-+ {
-+ stropt[pos] = strdup (p->option);
-+ pos++;
-+ p = p->next;
-+ }
- stropt[pos] = NULL;
- }
-
--- /dev/null
+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
+
+++ /dev/null
-From d4a484db1684cce15966bb722644416f90253ea7 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Thu, 30 Apr 2015 13:53:11 +0800
-Subject: [PATCH 5/7] xl2tpd-control: cleaup result file atexit().
-
----
- xl2tpd-control.c | 20 +++++++++++++-------
- 1 file changed, 13 insertions(+), 7 deletions(-)
-
---- a/xl2tpd-control.c
-+++ b/xl2tpd-control.c
-@@ -35,6 +35,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 +120,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 +206,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 +304,6 @@ int main (int argc, char *argv[])
- );
- printf ("%s", rbuf);
-
-- /* cleaning up */
--
-- close (result_fd);
-- unlink (result_filename);
--
- return command_result_code;
- }
-
--- /dev/null
+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
+
+++ /dev/null
-From 1e8b82388578a622c5caf8fa04c238fdd7808ecc Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Thu, 30 Apr 2015 13:53:40 +0800
-Subject: [PATCH 6/7] xl2tpd: fix possible buffer overflow when filling
- stropt[].
-
----
- xl2tpd.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/xl2tpd.c
-+++ b/xl2tpd.c
-@@ -490,7 +490,8 @@ int start_pppd (struct call *c, struct p
-
- {
- struct ppp_opts *p = opts;
-- while (p)
-+ int maxn_opts = sizeof(stropt) / sizeof(stropt[0]) - 1;
-+ while (p && pos < maxn_opts)
- {
- stropt[pos] = strdup (p->option);
- pos++;
--- /dev/null
+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
+
+++ /dev/null
-From 44ced2bbf1d6b39bb36c3cb8be6e40c8764e2e8a Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Thu, 30 Apr 2015 13:57:36 +0800
-Subject: [PATCH 7/7] l2tp_log: remove log prefix that will duplicate with
- procd.
-
----
- misc.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/misc.c
-+++ b/misc.c
-@@ -61,7 +61,7 @@ void l2tp_log (int level, const char *fm
- init_log();
- SYSLOG_CALL( syslog (level, "%s", buf) );
- } else {
-- fprintf(stderr, "xl2tpd[%d]: %s", getpid(), buf);
-+ fprintf(stderr, "%s", buf);
- }
- }
-
--- /dev/null
+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
+
--- /dev/null
+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
+
--- /dev/null
+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
+
--- /dev/null
+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
+
+++ /dev/null
-Index: xl2tpd-1.3.7pre20141126/xl2tpd-control.c
-===================================================================
---- xl2tpd-1.3.7pre20141126.orig/xl2tpd-control.c
-+++ xl2tpd-1.3.7pre20141126/xl2tpd-control.c
-@@ -12,6 +12,7 @@
-
- #define _GNU_SOURCE
-
-+#include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- #include <stdarg.h>
#
-# 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.
BASE_VERSION:=4.3
PKG_NAME:=bash
-PKG_VERSION:=$(BASE_VERSION).33
+PKG_VERSION:=$(BASE_VERSION).39
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(BASE_VERSION).tar.gz
--- a/execute_cmd.c
+++ b/execute_cmd.c
-@@ -2409,7 +2409,16 @@ execute_pipeline (command, asynchronous,
+@@ -2413,7 +2413,16 @@ execute_pipeline (command, asynchronous,
#endif
lstdin = wait_for (lastpid);
#if defined (JOB_CONTROL)
--- /dev/null
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-034
+
+Bug-Reported-by: Dreamcat4 <dreamcat4@gmail.com>
+Bug-Reference-ID: <CAN39uTpAEs2GFu4ebC_SfSVMRTh-DJ9YanrY4BZZ3OO+CCHjng@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-05/msg00001.html
+
+Bug-Description:
+
+If neither the -f nor -v options is supplied to unset, and a name argument is
+found to be a function and unset, subsequent name arguments are not treated as
+variables before attempting to unset a function by that name.
+
+Patch (apply with `patch -p0'):
+
+--- a/builtins/set.def
++++ b/builtins/set.def
+@@ -751,9 +751,11 @@ unset_builtin (list)
+ WORD_LIST *list;
+ {
+ int unset_function, unset_variable, unset_array, opt, nameref, any_failed;
++ int global_unset_func, global_unset_var;
+ char *name;
+
+ unset_function = unset_variable = unset_array = nameref = any_failed = 0;
++ global_unset_func = global_unset_var = 0;
+
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "fnv")) != -1)
+@@ -761,10 +763,10 @@ unset_builtin (list)
+ switch (opt)
+ {
+ case 'f':
+- unset_function = 1;
++ global_unset_func = 1;
+ break;
+ case 'v':
+- unset_variable = 1;
++ global_unset_var = 1;
+ break;
+ case 'n':
+ nameref = 1;
+@@ -777,7 +779,7 @@ unset_builtin (list)
+
+ list = loptend;
+
+- if (unset_function && unset_variable)
++ if (global_unset_func && global_unset_var)
+ {
+ builtin_error (_("cannot simultaneously unset a function and a variable"));
+ return (EXECUTION_FAILURE);
+@@ -795,6 +797,9 @@ unset_builtin (list)
+
+ name = list->word->word;
+
++ unset_function = global_unset_func;
++ unset_variable = global_unset_var;
++
+ #if defined (ARRAY_VARS)
+ unset_array = 0;
+ if (!unset_function && valid_array_reference (name))
+--- 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 33
++#define PATCHLEVEL 34
+
+ #endif /* _PATCHLEVEL_H_ */
--- /dev/null
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-035
+
+Bug-Reported-by: <romerox.adrian@gmail.com>
+Bug-Reference-ID: <CABV5r3zhPXmSKUe9uedeGc5YFBM2njJ1iVmY2h5neWdQpDBQug@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-08/msg00045.html
+
+Bug-Description:
+
+A locale with a long name can trigger a buffer overflow and core dump. This
+applies on systems that do not have locale_charset in libc, are not using
+GNU libiconv, and are not using the libintl that ships with bash in lib/intl.
+
+Patch (apply with `patch -p0'):
+
+--- a/lib/sh/unicode.c
++++ b/lib/sh/unicode.c
+@@ -78,13 +78,15 @@ stub_charset ()
+ s = strrchr (locale, '.');
+ if (s)
+ {
+- strcpy (charsetbuf, s+1);
++ strncpy (charsetbuf, s+1, sizeof (charsetbuf) - 1);
++ charsetbuf[sizeof (charsetbuf) - 1] = '\0';
+ t = strchr (charsetbuf, '@');
+ if (t)
+ *t = 0;
+ return charsetbuf;
+ }
+- strcpy (charsetbuf, locale);
++ strncpy (charsetbuf, locale, sizeof (charsetbuf) - 1);
++ charsetbuf[sizeof (charsetbuf) - 1] = '\0';
+ return charsetbuf;
+ }
+ #endif
+--- 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 34
++#define PATCHLEVEL 35
+
+ #endif /* _PATCHLEVEL_H_ */
--- /dev/null
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-036
+
+Bug-Reported-by: emanuelczirai@cryptolab.net
+Bug-Reference-ID: <f962e4f556da5ebfadaf7afe9c78a8cb@cryptolab.net>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-02/msg00071.html
+
+Bug-Description:
+
+When evaluating and setting integer variables, and the assignment fails to
+create a variable (for example, when performing an operation on an array
+variable with an invalid subscript), bash attempts to dereference a null
+pointer, causing a segmentation violation.
+
+Patch (apply with `patch -p0'):
+
+--- a/variables.c
++++ b/variables.c
+@@ -2833,10 +2833,12 @@ bind_int_variable (lhs, rhs)
+ #endif
+ v = bind_variable (lhs, rhs, 0);
+
+- if (v && isint)
+- VSETATTR (v, att_integer);
+-
+- VUNSETATTR (v, att_invisible);
++ if (v)
++ {
++ if (isint)
++ VSETATTR (v, att_integer);
++ VUNSETATTR (v, att_invisible);
++ }
+
+ return (v);
+ }
+--- 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 35
++#define PATCHLEVEL 36
+
+ #endif /* _PATCHLEVEL_H_ */
--- /dev/null
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-037
+
+Bug-Reported-by: Greg Wooledge <wooledg@eeg.ccf.org>
+Bug-Reference-ID: <20150204144240.GN13956@eeg.ccf.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-02/msg00007.html
+
+Bug-Description:
+
+If an associative array uses `@' or `*' as a subscript, `declare -p' produces
+output that cannot be reused as input.
+
+Patch (apply with `patch -p0'):
+
+--- a/assoc.c
++++ b/assoc.c
+@@ -436,6 +436,8 @@ assoc_to_assign (hash, quoted)
+ #if 1
+ if (sh_contains_shell_metas (tlist->key))
+ istr = sh_double_quote (tlist->key);
++ else if (ALL_ELEMENT_SUB (tlist->key[0]) && tlist->key[1] == '\0')
++ istr = sh_double_quote (tlist->key);
+ else
+ istr = tlist->key;
+ #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 36
++#define PATCHLEVEL 37
+
+ #endif /* _PATCHLEVEL_H_ */
--- /dev/null
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-038
+
+Bug-Reported-by: worley@alum.mit.edu (Dale R. Worley)
+Bug-Reference-ID: <201406100051.s5A0pCeB014978@hobgoblin.ariadne.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-06/msg00028.html
+
+Bug-Description:
+
+There are a number of instances where `time' is not recognized as a reserved
+word when the shell grammar says it should be.
+
+Patch (apply with `patch -p0'):
+
+--- a/parse.y
++++ b/parse.y
+@@ -2818,11 +2818,16 @@ time_command_acceptable ()
+ case AND_AND:
+ case OR_OR:
+ case '&':
++ case WHILE:
+ case DO:
++ case UNTIL:
++ case IF:
+ case THEN:
++ case ELIF:
+ case ELSE:
+ case '{': /* } */
+- case '(': /* ) */
++ case '(': /* )( */
++ case ')': /* only valid in case statement */
+ case BANG: /* ! time pipeline */
+ case TIME: /* time time pipeline */
+ case TIMEOPT: /* time -p time pipeline */
+--- a/y.tab.c
++++ b/y.tab.c
+@@ -5130,11 +5130,16 @@ time_command_acceptable ()
+ case AND_AND:
+ case OR_OR:
+ case '&':
++ case WHILE:
+ case DO:
++ case UNTIL:
++ case IF:
+ case THEN:
++ case ELIF:
+ case ELSE:
+ case '{': /* } */
+- case '(': /* ) */
++ case '(': /* )( */
++ case ')': /* only valid in case statement */
+ case BANG: /* ! time pipeline */
+ case TIME: /* time time pipeline */
+ case TIMEOPT: /* time -p time pipeline */
+--- 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 37
++#define PATCHLEVEL 38
+
+ #endif /* _PATCHLEVEL_H_ */
--- /dev/null
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-039
+
+Bug-Reported-by: SN <poczta-sn@gazeta.pl>
+Bug-Reference-ID: <54E2554C.205@gazeta.pl>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-02/msg00060.html
+
+Bug-Description:
+
+Using the output of `declare -p' when run in a function can result in variables
+that are invisible to `declare -p'. This problem occurs when an assignment
+builtin such as `declare' receives a quoted compound array assignment as one of
+its arguments.
+
+Patch (apply with `patch -p0'):
+
+--- a/arrayfunc.c
++++ b/arrayfunc.c
+@@ -404,6 +404,9 @@ assign_array_var_from_word_list (var, li
+ (*var->assign_func) (var, l->word->word, i, 0);
+ else
+ array_insert (a, i, l->word->word);
++
++ VUNSETATTR (var, att_invisible); /* no longer invisible */
++
+ return var;
+ }
+
+@@ -634,6 +637,10 @@ assign_array_var_from_string (var, value
+
+ if (nlist)
+ dispose_words (nlist);
++
++ if (var)
++ VUNSETATTR (var, att_invisible); /* no longer invisible */
++
+ return (var);
+ }
+
+--- 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 38
++#define PATCHLEVEL 39
+
+ #endif /* _PATCHLEVEL_H_ */
SECTION:=utils
CATEGORY:=Utilities
TITLE:=PPS-tools
- DEPENDS:=@LINUX_3_10||@LINUX_3_13||@LINUX_3_14
+ DEPENDS:=@LINUX_3_10||@LINUX_3_13||@LINUX_3_14||@LINUX_3_18
endef
define Package/pps-tools/description
include $(TOPDIR)/rules.mk
PKG_NAME:=tcsh
-PKG_VERSION:=6.18.01
+PKG_VERSION:=6.19.00
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=ftp://ftp.astron.com/pub/tcsh/
-PKG_MD5SUM:=6eed09dbd4223ab5b6955378450d228a
+PKG_SOURCE_URL:=http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/
+PKG_MD5SUM:=f5f854833578647795bc906dd4bcb5d5
PKG_LICENSE:=BSD-4-Clause-UC
PKG_LICENSE_FILES:=Copyright
--- /dev/null
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -449,7 +449,7 @@ pure:$(P) ${OBJS}
+
+ gethost: gethost.c sh.err.h tc.const.h sh.h
+ rm -f gethost
+- ${CC_FOR_GETHOST} -o gethost ${CPPFLAGS} ${CFLAGS} $(srcdir)/gethost.c
++ ${CC_FOR_GETHOST} -o gethost ${CPPFLAGS} $(srcdir)/gethost.c
+
+ tc.defs.c: gethost host.defs
+ @rm -f $@.tmp
--- /dev/null
+--- a/runtime/doc/Makefile
++++ b/runtime/doc/Makefile
+@@ -310,7 +310,6 @@ all: tags vim.man evim.man vimdiff.man v
+ # Use Vim to generate the tags file. Can only be used when Vim has been
+ # compiled and installed. Supports multiple languages.
+ vimtags: $(DOCS)
+- $(VIMEXE) -u NONE -esX -c "helptags ++t ." -c quit
+
+ # Use "doctags" to generate the tags file. Only works for English!
+ tags: doctags $(DOCS)
PKG_NAME:=xz
PKG_VERSION:=5.2.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://tukaani.org/xz
$(1)/usr/lib/pkgconfig/
endef
+define Package/xz-utils/install
+ true
+endef
+
define Package/liblzma/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzma.so.* $(1)/usr/lib/