summaryrefslogtreecommitdiff
path: root/package/system/ubox
diff options
context:
space:
mode:
Diffstat (limited to 'package/system/ubox')
-rw-r--r--package/system/ubox/Makefile4
-rw-r--r--package/system/ubox/files/log.init2
-rw-r--r--package/system/ubox/patches/001-insmod.patch47
3 files changed, 49 insertions, 4 deletions
diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile
index 194789c..2d7ed29 100644
--- a/package/system/ubox/Makefile
+++ b/package/system/ubox/Makefile
@@ -1,13 +1,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ubox
-PKG_VERSION:=2014-05-30
+PKG_VERSION:=2015-02-25.1
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://nbd.name/luci2/ubox.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=c3d4118eee505f41c4d20a87f326479530837569
+PKG_SOURCE_VERSION:=31f0ff358b360ee461d845c1b3b5e5d38fa27925
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
CMAKE_INSTALL:=1
PKG_CHECK_FORMAT_SECURITY:=0
diff --git a/package/system/ubox/files/log.init b/package/system/ubox/files/log.init
index be38297..3e06fa5 100644
--- a/package/system/ubox/files/log.init
+++ b/package/system/ubox/files/log.init
@@ -19,7 +19,6 @@ validate_log_section()
'log_port:port:514' \
'log_proto:or("tcp", "udp"):udp' \
'log_prefix:string'
- return $?
}
validate_log_daemon()
@@ -27,7 +26,6 @@ validate_log_daemon()
uci_validate_section system system "${1}" \
'log_size:uinteger:0' \
'log_buffer_size:uinteger:0'
- return $?
}
start_service_daemon()
diff --git a/package/system/ubox/patches/001-insmod.patch b/package/system/ubox/patches/001-insmod.patch
new file mode 100644
index 0000000..af858d9
--- /dev/null
+++ b/package/system/ubox/patches/001-insmod.patch
@@ -0,0 +1,47 @@
+Index: ubox-2015-02-25.1/kmodloader.c
+===================================================================
+--- ubox-2015-02-25.1.orig/kmodloader.c
++++ ubox-2015-02-25.1/kmodloader.c
+@@ -483,14 +483,15 @@ static int insert_module(char *path, con
+ return ret;
+ }
+
+- data = malloc(s.st_size);
+- if (read(fd, data, s.st_size) == s.st_size)
+- ret = syscall(__NR_init_module, data, (unsigned long) s.st_size, options);
+- else
++ data = mmap(NULL, s.st_size, PROT_READ,
++ MAP_PRIVATE, fd, 0);
++ if (data == MAP_FAILED)
+ ERROR("failed to read full module %s\n", path);
++ else
++ ret = syscall(__NR_init_module, data, (unsigned long) s.st_size, options);
+
++ munmap(data, s.st_size);
+ close(fd);
+- free(data);
+
+ return ret;
+ }
+@@ -574,15 +575,18 @@ static int main_insmod(int argc, char **
+ if (argc < 2)
+ return print_insmod_usage();
+
++ if (init_module_folders())
++ return -1;
++
++ if (scan_loaded_modules())
++ return -1;
++
+ name = get_module_name(argv[1]);
+ if (!name) {
+ ERROR("cannot find module - %s\n", argv[1]);
+ return -1;
+ }
+
+- if (scan_loaded_modules())
+- return -1;
+-
+ if (find_module(name)) {
+ ERROR("module is already loaded - %s\n", name);
+ return -1;