From a67193e2ca69c8c23bedd16d1a964cf69582dd0e Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 29 Jul 2018 19:19:24 -0700 Subject: [PATCH] coova-chilli: Update to 1.4 Switch to codeload for simplicity. Signed-off-by: Rosen Penev --- net/coova-chilli/Makefile | 11 ++-- ..._kmod.patch => 100-fix_compile_kmod.patch} | 8 +-- ....patch => 200-fix-compile-with-musl.patch} | 34 ++++++----- .../201-fix_dereferencing_pointers.patch | 49 --------------- .../patches/300-fix-compile-with-cyassl.patch | 28 --------- .../patches/400-fix-compile-with-musl.patch | 61 ------------------- ...1-fix-compile-misleading-indentation.patch | 31 ---------- 7 files changed, 26 insertions(+), 196 deletions(-) rename net/coova-chilli/patches/{200-fix_compile_kmod.patch => 100-fix_compile_kmod.patch} (54%) rename net/coova-chilli/patches/{100-fix-sysinfo-redeclaration.patch => 200-fix-compile-with-musl.patch} (51%) delete mode 100644 net/coova-chilli/patches/201-fix_dereferencing_pointers.patch delete mode 100644 net/coova-chilli/patches/300-fix-compile-with-cyassl.patch delete mode 100644 net/coova-chilli/patches/400-fix-compile-with-musl.patch delete mode 100644 net/coova-chilli/patches/401-fix-compile-misleading-indentation.patch diff --git a/net/coova-chilli/Makefile b/net/coova-chilli/Makefile index 2ec3c015b..5c8f46026 100644 --- a/net/coova-chilli/Makefile +++ b/net/coova-chilli/Makefile @@ -8,18 +8,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=coova-chilli -PKG_VERSION:=1.3.0+20141128 +PKG_VERSION:=1.4 PKG_MAINTAINER:=Jaehoon You PKG_LICENSE:=GPL-2.0+ PKG_LICENSE_FILES:=COPYING PKG_RELEASE:=6 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://github.com/coova/coova-chilli -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=b93de20a288c01c2ba28e96e31ad6da01627f45f PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MIRROR_HASH:=89c9b313881c658a0f6b91329a78bb1a0151878b19bc99b315976081c6355557 +PKG_SOURCE_URL:=https://codeload.github.com/coova/coova-chilli/tar.gz/$(PKG_VERSION)? +PKG_HASH:=987647a4c8efe7b1e2d7108d56068e3bd7830d326680f0eaa2c705e4c59c46d9 PKG_INSTALL:=1 @@ -43,7 +40,7 @@ define Package/coova-chilli CATEGORY:=Network DEPENDS:=+kmod-tun +librt +COOVACHILLI_CYASSL:libcyassl +COOVACHILLI_OPENSSL:libopenssl TITLE:=Wireless LAN HotSpot controller (Coova Chilli Version) - URL:=http://www.coova.org/CoovaChilli + URL:=https://coova.github.io/ MENU:=1 endef diff --git a/net/coova-chilli/patches/200-fix_compile_kmod.patch b/net/coova-chilli/patches/100-fix_compile_kmod.patch similarity index 54% rename from net/coova-chilli/patches/200-fix_compile_kmod.patch rename to net/coova-chilli/patches/100-fix_compile_kmod.patch index 27225786e..f2047b259 100644 --- a/net/coova-chilli/patches/200-fix_compile_kmod.patch +++ b/net/coova-chilli/patches/100-fix_compile_kmod.patch @@ -1,11 +1,7 @@ --- a/src/linux/Makefile +++ b/src/linux/Makefile -@@ -21,11 +21,11 @@ lib%.so: lib%.o - $(CC) $(CFLAGS) -shared -o $@ $^; - - lib%.o: lib%.c -- $(CC) $(CFLAGS) -fPIC -O2 -Wall -I${KERNEL_DIR}/include -D_INIT=lib$*_init -c -o $@ $<; -+ $(CC) $(CFLAGS) -D_INIT=lib$*_init -c -o $@ $<; +@@ -25,8 +25,8 @@ lib%.o: lib%.c + $(CC) $(CFLAGS) -fPIC -O2 -Wall -D_INIT=lib$*_init -c -o $@ $<; install: modules_install libxt_coova.so - mkdir -p $(DESTDIR)/lib/xtables/ diff --git a/net/coova-chilli/patches/100-fix-sysinfo-redeclaration.patch b/net/coova-chilli/patches/200-fix-compile-with-musl.patch similarity index 51% rename from net/coova-chilli/patches/100-fix-sysinfo-redeclaration.patch rename to net/coova-chilli/patches/200-fix-compile-with-musl.patch index 2efecbe23..cbc201c44 100644 --- a/net/coova-chilli/patches/100-fix-sysinfo-redeclaration.patch +++ b/net/coova-chilli/patches/200-fix-compile-with-musl.patch @@ -1,24 +1,30 @@ --- a/src/system.h +++ b/src/system.h -@@ -83,10 +83,6 @@ - #include - #endif - --#ifdef HAVE_SYS_SYSINFO_H --#include --#endif -- - #ifdef HAVE_TIME_H - #include - #endif -@@ -139,6 +135,10 @@ - #include +@@ -112,6 +112,11 @@ + #include #endif +#ifdef HAVE_SYS_SYSINFO_H ++#define _LINUX_SYSINFO_H +#include +#endif + - #elif defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__) + #ifdef HAVE_INTTYPES_H + #define __STDC_FORMAT_MACROS + #include +@@ -129,15 +134,6 @@ + #include + #endif + +-#ifdef HAVE_SYS_SYSINFO_H +-#include +-#else +-#ifdef HAVE_LINUX_SYSINFO_H +-#define _LINUX_KERNEL_H +-#include +-#endif +-#endif +- + #elif defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__) #include #include diff --git a/net/coova-chilli/patches/201-fix_dereferencing_pointers.patch b/net/coova-chilli/patches/201-fix_dereferencing_pointers.patch deleted file mode 100644 index d608835a4..000000000 --- a/net/coova-chilli/patches/201-fix_dereferencing_pointers.patch +++ /dev/null @@ -1,49 +0,0 @@ ---- a/src/linux/xt_coova.c -+++ b/src/linux/xt_coova.c -@@ -292,6 +292,8 @@ static int coova_mt_check(const struct x - struct coova_table *t; - #ifdef CONFIG_PROC_FS - struct proc_dir_entry *pde; -+ kuid_t uid; -+ kgid_t gid; - #endif - unsigned i; - int ret = 0; -@@ -330,8 +332,9 @@ static int coova_mt_check(const struct x - ret = -ENOMEM; - goto out; - } -- pde->uid = ip_list_uid; -- pde->gid = ip_list_gid; -+ uid = make_kuid(&init_user_ns, ip_list_uid); -+ gid = make_kgid(&init_user_ns, ip_list_gid); -+ proc_set_user(pde, uid, gid); - #endif - spin_lock_bh(&coova_lock); - list_add_tail(&t->list, &tables); -@@ -445,14 +448,13 @@ static const struct seq_operations coova - - static int coova_seq_open(struct inode *inode, struct file *file) - { -- struct proc_dir_entry *pde = PDE(inode); - struct coova_iter_state *st; - - st = __seq_open_private(file, &coova_seq_ops, sizeof(*st)); - if (st == NULL) - return -ENOMEM; - -- st->table = pde->data; -+ st->table = PDE_DATA(inode); - return 0; - } - -@@ -460,8 +462,7 @@ static ssize_t - coova_mt_proc_write(struct file *file, const char __user *input, - size_t size, loff_t *loff) - { -- const struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); -- struct coova_table *t = pde->data; -+ struct coova_table *t = PDE_DATA(file->f_path.dentry->d_inode); - struct coova_entry *e; - char buf[sizeof("+b335:1d35:1e55:dead:c0de:1715:5afe:c0de")]; - const char *c = buf; diff --git a/net/coova-chilli/patches/300-fix-compile-with-cyassl.patch b/net/coova-chilli/patches/300-fix-compile-with-cyassl.patch deleted file mode 100644 index 3b61d49ca..000000000 --- a/net/coova-chilli/patches/300-fix-compile-with-cyassl.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/src/md5.h -+++ b/src/md5.h -@@ -28,6 +28,14 @@ - #define MD5Update MD5_Update - #define MD5Final MD5_Final - -+#elif HAVE_CYASSL -+#include -+ -+#define MD5Init MD5_Init -+#define MD5Update MD5_Update -+#define MD5Final MD5_Final -+ -+typedef struct CYASSL_MD5_CTX MD5_CTX; - #else - - struct MD5Context { ---- a/src/md5.c -+++ b/src/md5.c -@@ -18,7 +18,7 @@ - #include /* for memcpy() */ - #include "md5.h" - --#ifndef HAVE_OPENSSL -+#if !defined(HAVE_OPENSSL) && !defined(HAVE_CYASSL) - - void byteReverse(unsigned char *buf, size_t longs); - diff --git a/net/coova-chilli/patches/400-fix-compile-with-musl.patch b/net/coova-chilli/patches/400-fix-compile-with-musl.patch deleted file mode 100644 index a810a7349..000000000 --- a/net/coova-chilli/patches/400-fix-compile-with-musl.patch +++ /dev/null @@ -1,61 +0,0 @@ ---- a/src/system.h -+++ b/src/system.h -@@ -78,11 +78,6 @@ - #include - #endif - --#ifdef HAVE_LINUX_SYSINFO_H --#define _LINUX_KERNEL_H --#include --#endif -- - #ifdef HAVE_TIME_H - #include - #endif -@@ -123,6 +118,11 @@ - #include - #endif - -+#ifdef HAVE_SYS_SYSINFO_H -+#define _LINUX_SYSINFO_H -+#include -+#endif -+ - #if defined(__linux__) - #include - #include -@@ -135,10 +135,6 @@ - #include - #endif - --#ifdef HAVE_SYS_SYSINFO_H --#include --#endif -- - #elif defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__) - #include - #include -@@ -170,10 +166,6 @@ - #include - #endif - --#ifdef HAVE_NET_ETHERNET_H --#include --#endif -- - #ifdef HAVE_ASM_TYPES_H - #include - #endif ---- a/src/chilli_limits.h -+++ b/src/chilli_limits.h -@@ -18,8 +18,8 @@ - * - */ - --#ifndef _LIMITS_H --#define _LIMITS_H -+#ifndef _CHILLI_LIMITS_H -+#define _CHILLI_LIMITS_H - - /* - * extracted from various .h files, needs some cleanup. diff --git a/net/coova-chilli/patches/401-fix-compile-misleading-indentation.patch b/net/coova-chilli/patches/401-fix-compile-misleading-indentation.patch deleted file mode 100644 index 9aaf5463c..000000000 --- a/net/coova-chilli/patches/401-fix-compile-misleading-indentation.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/src/chilli.c -+++ b/src/chilli.c -@@ -4297,8 +4297,10 @@ static int chilliauth_cb(struct radius_t - while (!differ && r1 > 0 && r2 > 0); - } - -- if (newfd) safe_close(newfd); newfd=0; -- if (oldfd) safe_close(oldfd); oldfd=0; -+ if (newfd) safe_close(newfd); -+ newfd=0; -+ if (oldfd) safe_close(oldfd); -+ oldfd=0; - - if (differ) { - log_dbg("Writing out new hs.conf file with administraive-user settings"); ---- a/src/redir.c -+++ b/src/redir.c -@@ -3176,9 +3176,11 @@ pid_t redir_fork(int in, int out) { - } - - #if defined(F_DUPFD) -- if (fcntl(in,F_GETFL,0) == -1) return -1; safe_close(0); -+ if (fcntl(in,F_GETFL,0) == -1) return -1; -+ safe_close(0); - if (fcntl(in,F_DUPFD,0) == -1) return -1; -- if (fcntl(out,F_GETFL,1) == -1) return -1; safe_close(1); -+ if (fcntl(out,F_GETFL,1) == -1) return -1; -+ safe_close(1); - if (fcntl(out,F_DUPFD,1) == -1) return -1; - #else - if (dup2(in,0) == -1) return -1;