aboutsummaryrefslogtreecommitdiffstats
path: root/package/aodv-uu/patches
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2007-02-20 23:39:33 +0000
committerFlorian Fainelli <florian@openwrt.org>2007-02-20 23:39:33 +0000
commitf393bed10e090c5880bf45c65258c9e4c9946833 (patch)
tree6ea6c8439c879f421e9c78b31227ece5fa1e6b10 /package/aodv-uu/patches
parentb37101053aad1afc08f689d32907aafaa3b48b8c (diff)
downloadupstream-f393bed10e090c5880bf45c65258c9e4c9946833.tar.gz
upstream-f393bed10e090c5880bf45c65258c9e4c9946833.tar.bz2
upstream-f393bed10e090c5880bf45c65258c9e4c9946833.zip
Move aodv-uu to trunk/
SVN-Revision: 6335
Diffstat (limited to 'package/aodv-uu/patches')
-rw-r--r--package/aodv-uu/patches/001-normalize.patch62
-rw-r--r--package/aodv-uu/patches/002-linux_2.6.19_ip_route_me_harder_change.patch47
-rw-r--r--package/aodv-uu/patches/003-linux_2.6.19_security_netlink_recv_change.patch15
-rw-r--r--package/aodv-uu/patches/004-linux_2.6.19_includes.patch24
4 files changed, 148 insertions, 0 deletions
diff --git a/package/aodv-uu/patches/001-normalize.patch b/package/aodv-uu/patches/001-normalize.patch
new file mode 100644
index 0000000000..3c76700fbb
--- /dev/null
+++ b/package/aodv-uu/patches/001-normalize.patch
@@ -0,0 +1,62 @@
+diff -urN aodv-uu-0.9.1/lnx/Makefile aodv-uu-0.9.1.new/lnx/Makefile
+--- aodv-uu-0.9.1/lnx/Makefile 2005-03-17 22:37:59.000000000 +0100
++++ aodv-uu-0.9.1.new/lnx/Makefile 2006-07-25 15:46:02.000000000 +0200
+@@ -30,7 +30,7 @@
+ KCFLAGS=-Wall -Wno-strict-aliasing -O2 $(KDEFS) $(KINC) $(XDEFS)
+ KCFLAGS_ARM=-Wall -O2 -D__KERNEL__ -DMODULE -nostdinc $(shell $(ARM_CC) -print-search-dirs | sed -ne 's/install: \(.*\)/-I \1include/gp') -I$(KERNEL_INC)
+ KCFLAGS_MIPS=-Wall -mips2 -O2 -fno-pic -mno-abicalls -mlong-calls -G0 -msoft-float -D__KERNEL__ -DMODULE -nostdinc $(shell $(MIPS_CC) -print-search-dirs | sed -ne 's/install: \(.*\)/-I \1include/gp') -I$(KERNEL_INC) $(XDEFS)
+-
++endif
+ .PHONY: clean clean-2.4 clean-2.6 indent default
+
+ # Check for kernel version
+@@ -87,5 +87,3 @@
+
+ indent:
+ indent -kr -i8 -ts8 -sob -l80 -ss -ncs *.c *.h
+-endif
+-
+diff -urN aodv-uu-0.9.1/Makefile aodv-uu-0.9.1.new/Makefile
+--- aodv-uu-0.9.1/Makefile 2006-07-25 15:03:49.000000000 +0200
++++ aodv-uu-0.9.1.new/Makefile 2006-07-25 15:03:59.000000000 +0200
+@@ -87,7 +87,7 @@
+ mips: aodvd-mips kaodv-mips
+
+ endian.h:
+- $(CC) $(CFLAGS) -o endian endian.c
++ gcc -o endian endian.c
+ ./endian > endian.h
+
+ $(OBJS): %.o: %.c Makefile
+@@ -138,19 +138,18 @@
+ @makedepend -Y./ -- $(DEFS) -- $(SRC) &>/dev/null
+ @makedepend -a -Y./ -- $(KDEFS) kaodv.c &>/dev/null
+
+-install: default
+- install -s -m 755 aodvd /usr/sbin/aodvd
+- @if [ ! -d /lib/modules/$(KERNEL)/aodv ]; then \
+- mkdir /lib/modules/$(KERNEL)/aodv; \
+- fi
+-
+- @echo "Installing kernel module in /lib/modules/$(KERNEL)/aodv/";
+- @if [ -f ./kaodv.ko ]; then \
+- install -m 644 kaodv.ko /lib/modules/$(KERNEL)/aodv/kaodv.ko; \
+- else \
+- install -m 644 kaodv.o /lib/modules/$(KERNEL)/aodv/kaodv.o; \
+- fi
+- /sbin/depmod -a
++install: install-aodvd install-kaodv
++
++install-aodvd:
++ @echo "Installing aodv in $(DESTDIR)/usr/sbin";
++ install -d -m0755 $(DESTDIR)/usr/sbin/
++ install -m0755 aodvd $(DESTDIR)/usr/sbin/aodvd
++
++install-kaodv:
++ @echo "Installing kernel module in $(DESTDIR)/lib/modules/$(KERNEL)/";
++ install -d -m0644 $(DESTDIR)/lib/modules/$(KERNEL)/
++ install -m 644 lnx/kaodv.$(KMOD_SUFFIX) $(DESTDIR)/lib/modules/$(KERNEL)/kaodv.$(KMOD_SUFFIX);
++
+ uninstall:
+ rm -f /usr/sbin/aodvd
+ rm -rf /lib/modules/$(KERNEL)/aodv
diff --git a/package/aodv-uu/patches/002-linux_2.6.19_ip_route_me_harder_change.patch b/package/aodv-uu/patches/002-linux_2.6.19_ip_route_me_harder_change.patch
new file mode 100644
index 0000000000..b8b6583b09
--- /dev/null
+++ b/package/aodv-uu/patches/002-linux_2.6.19_ip_route_me_harder_change.patch
@@ -0,0 +1,47 @@
+diff -ruN aodv-uu-0.9.3-old/lnx/kaodv-mod.c aodv-uu-0.9.3-new/lnx/kaodv-mod.c
+--- aodv-uu-0.9.3-old/lnx/kaodv-mod.c 2006-09-20 19:58:38.000000000 +0200
++++ aodv-uu-0.9.3-new/lnx/kaodv-mod.c 2006-12-16 22:08:01.000000000 +0100
+@@ -19,7 +19,7 @@
+ * Author: Erik Nordström, <erik.nordstrom@it.uu.se>
+ *
+ *****************************************************************************/
+-#include <linux/config.h>
++#include <linux/autoconf.h>
+ #include <linux/version.h>
+
+ #ifdef KERNEL26
+@@ -258,7 +258,11 @@
+ if (!(*skb))
+ return NF_STOLEN;
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
++ ip_route_me_harder(skb, RTN_UNSPEC);
++#else
+ ip_route_me_harder(skb);
++#endif
+ }
+ break;
+ case NF_IP_POST_ROUTING:
+diff -ruN aodv-uu-0.9.3-old/lnx/kaodv-queue.c aodv-uu-0.9.3-new/lnx/kaodv-queue.c
+--- aodv-uu-0.9.3-old/lnx/kaodv-queue.c 2006-09-20 19:58:38.000000000 +0200
++++ aodv-uu-0.9.3-new/lnx/kaodv-queue.c 2006-12-16 22:17:16.000000000 +0100
+@@ -29,6 +29,7 @@
+ #include <linux/spinlock.h>
+ #include <linux/sysctl.h>
+ #include <linux/proc_fs.h>
++#include <linux/version.h>
+ #include <net/sock.h>
+ #include <net/route.h>
+ #include <net/icmp.h>
+@@ -246,7 +247,11 @@
+ if (!entry->skb)
+ goto next;
+ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
++ ip_route_me_harder(&entry->skb, RTN_UNSPEC);
++#else
+ ip_route_me_harder(&entry->skb);
++#endif
+
+ pkts++;
+
diff --git a/package/aodv-uu/patches/003-linux_2.6.19_security_netlink_recv_change.patch b/package/aodv-uu/patches/003-linux_2.6.19_security_netlink_recv_change.patch
new file mode 100644
index 0000000000..725f03bc2f
--- /dev/null
+++ b/package/aodv-uu/patches/003-linux_2.6.19_security_netlink_recv_change.patch
@@ -0,0 +1,15 @@
+diff -ruN aodv-uu-0.9.3-old/lnx/kaodv-netlink.c aodv-uu-0.9.3-new/lnx/kaodv-netlink.c
+--- aodv-uu-0.9.3-old/lnx/kaodv-netlink.c 2006-09-20 19:58:38.000000000 +0200
++++ aodv-uu-0.9.3-new/lnx/kaodv-netlink.c 2006-12-16 22:14:14.000000000 +0100
+@@ -284,7 +284,11 @@
+ /* RCV_SKB_FAIL(-EINVAL); */
+
+ #ifdef KERNEL26
++# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
++ if (security_netlink_recv(skb, CAP_NET_ADMIN))
++# else
+ if (security_netlink_recv(skb))
++# endif
+ RCV_SKB_FAIL(-EPERM);
+ #endif
+ //write_lock_bh(&queue_lock);
diff --git a/package/aodv-uu/patches/004-linux_2.6.19_includes.patch b/package/aodv-uu/patches/004-linux_2.6.19_includes.patch
new file mode 100644
index 0000000000..92cae3e1c8
--- /dev/null
+++ b/package/aodv-uu/patches/004-linux_2.6.19_includes.patch
@@ -0,0 +1,24 @@
+--- aodv-uu-0.9.3-old/main.c 2006-09-20 19:58:38.000000000 +0200
++++ aodv-uu-0.9.3/main.c 2006-12-16 22:27:36.000000000 +0100
+@@ -26,6 +26,8 @@
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/stat.h>
++#include <linux/types.h>
++#include <linux/if.h>
+ #include <linux/sockios.h>
+ #include <linux/wireless.h>
+ #include <getopt.h>
+--- aodv-uu-0.9.3-old/nl.c 2006-09-20 19:58:38.000000000 +0200
++++ aodv-uu-0.9.3/nl.c 2006-12-16 22:29:55.000000000 +0100
+@@ -33,6 +33,10 @@
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <linux/rtnetlink.h>
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
++#include <linux/if_addr.h>
++#endif
+
+ #include "defs.h"
+ #include "lnx/kaodv-netlink.h"