Browse Source

coova-chilli: Update to 1.4

Switch to codeload for simplicity.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
lilik-openwrt-22.03
Rosen Penev 6 years ago
parent
commit
a67193e2ca
7 changed files with 26 additions and 196 deletions
  1. +4
    -7
      net/coova-chilli/Makefile
  2. +2
    -6
      net/coova-chilli/patches/100-fix_compile_kmod.patch
  3. +20
    -14
      net/coova-chilli/patches/200-fix-compile-with-musl.patch
  4. +0
    -49
      net/coova-chilli/patches/201-fix_dereferencing_pointers.patch
  5. +0
    -28
      net/coova-chilli/patches/300-fix-compile-with-cyassl.patch
  6. +0
    -61
      net/coova-chilli/patches/400-fix-compile-with-musl.patch
  7. +0
    -31
      net/coova-chilli/patches/401-fix-compile-misleading-indentation.patch

+ 4
- 7
net/coova-chilli/Makefile View File

@ -8,18 +8,15 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=coova-chilli PKG_NAME:=coova-chilli
PKG_VERSION:=1.3.0+20141128
PKG_VERSION:=1.4
PKG_MAINTAINER:=Jaehoon You <teslamint@gmail.com> PKG_MAINTAINER:=Jaehoon You <teslamint@gmail.com>
PKG_LICENSE:=GPL-2.0+ PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING PKG_LICENSE_FILES:=COPYING
PKG_RELEASE:=6 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_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 PKG_INSTALL:=1
@ -43,7 +40,7 @@ define Package/coova-chilli
CATEGORY:=Network CATEGORY:=Network
DEPENDS:=+kmod-tun +librt +COOVACHILLI_CYASSL:libcyassl +COOVACHILLI_OPENSSL:libopenssl DEPENDS:=+kmod-tun +librt +COOVACHILLI_CYASSL:libcyassl +COOVACHILLI_OPENSSL:libopenssl
TITLE:=Wireless LAN HotSpot controller (Coova Chilli Version) TITLE:=Wireless LAN HotSpot controller (Coova Chilli Version)
URL:=http://www.coova.org/CoovaChilli
URL:=https://coova.github.io/
MENU:=1 MENU:=1
endef endef


net/coova-chilli/patches/200-fix_compile_kmod.patch → net/coova-chilli/patches/100-fix_compile_kmod.patch View File


net/coova-chilli/patches/100-fix-sysinfo-redeclaration.patch → net/coova-chilli/patches/200-fix-compile-with-musl.patch View File


+ 0
- 49
net/coova-chilli/patches/201-fix_dereferencing_pointers.patch View File

@ -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;

+ 0
- 28
net/coova-chilli/patches/300-fix-compile-with-cyassl.patch View File

@ -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 <cyassl/openssl/md5.h>
+
+#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 <string.h> /* for memcpy() */
#include "md5.h"
-#ifndef HAVE_OPENSSL
+#if !defined(HAVE_OPENSSL) && !defined(HAVE_CYASSL)
void byteReverse(unsigned char *buf, size_t longs);

+ 0
- 61
net/coova-chilli/patches/400-fix-compile-with-musl.patch View File

@ -1,61 +0,0 @@
--- a/src/system.h
+++ b/src/system.h
@@ -78,11 +78,6 @@
#include <sys/stat.h>
#endif
-#ifdef HAVE_LINUX_SYSINFO_H
-#define _LINUX_KERNEL_H
-#include <linux/sysinfo.h>
-#endif
-
#ifdef HAVE_TIME_H
#include <time.h>
#endif
@@ -123,6 +118,11 @@
#include <signal.h>
#endif
+#ifdef HAVE_SYS_SYSINFO_H
+#define _LINUX_SYSINFO_H
+#include <sys/sysinfo.h>
+#endif
+
#if defined(__linux__)
#include <asm/types.h>
#include <linux/if.h>
@@ -135,10 +135,6 @@
#include <linux/un.h>
#endif
-#ifdef HAVE_SYS_SYSINFO_H
-#include <sys/sysinfo.h>
-#endif
-
#elif defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__)
#include <net/if.h>
#include <net/bpf.h>
@@ -170,10 +166,6 @@
#include <net/if_tun.h>
#endif
-#ifdef HAVE_NET_ETHERNET_H
-#include <net/ethernet.h>
-#endif
-
#ifdef HAVE_ASM_TYPES_H
#include <asm/types.h>
#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.

+ 0
- 31
net/coova-chilli/patches/401-fix-compile-misleading-indentation.patch View File

@ -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;

Loading…
Cancel
Save