From 969d1cf56867751d577d08709da6f4c557203f99 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Tue, 30 Jun 2015 15:55:54 +0200 Subject: [PATCH 01/10] nat46: fix leak of conntrack entries, fix checksum calculation Signed-off-by: Steven Barth --- nat46/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nat46/Makefile b/nat46/Makefile index f30fbc9..24ecbef 100644 --- a/nat46/Makefile +++ b/nat46/Makefile @@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=nat46 -PKG_VERSION:=4 +PKG_VERSION:=5 PKG_RELEASE:=$(PKG_SOURCE_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=https://github.com/ayourtch/nat46.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=ccbba8595d7ccbc2ccb1e7d81b420e9587f07fe5 +PKG_SOURCE_VERSION:=ead1fb8e1b9064f750a128e2d5a05244bb41c01d PKG_MAINTAINER:=Steven Barth PKG_LICENSE:=GPL-2.0 From 6172dcef329e1b306149cded3340da8f28501266 Mon Sep 17 00:00:00 2001 From: Bastian Bittorf Date: Wed, 1 Jul 2015 21:31:54 +0200 Subject: [PATCH 02/10] olsrd: 0.9.0.1 -> 0.9.0.2 (bugfix-release) --- olsrd/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/olsrd/Makefile b/olsrd/Makefile index 02adc92..4e8c7b0 100644 --- a/olsrd/Makefile +++ b/olsrd/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=olsrd -PKG_VERSION:=0.9.0.1 +PKG_VERSION:=0.9.0.2 PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.olsr.org/releases/0.9 -PKG_MD5SUM:=5dec2c08e7bbec6789af7279e7aafc6c +PKG_MD5SUM:=8a2675c33990706cc291b59934024783 PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=BSD-3-Clause From 2e110ce133821000cc6aa7063ad293b57a607fc9 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Thu, 2 Jul 2015 20:53:38 +0200 Subject: [PATCH 03/10] nat46: fix netfilter references Signed-off-by: Steven Barth --- nat46/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nat46/Makefile b/nat46/Makefile index 24ecbef..65b92c2 100644 --- a/nat46/Makefile +++ b/nat46/Makefile @@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=nat46 -PKG_VERSION:=5 +PKG_VERSION:=6 PKG_RELEASE:=$(PKG_SOURCE_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=https://github.com/ayourtch/nat46.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=ead1fb8e1b9064f750a128e2d5a05244bb41c01d +PKG_SOURCE_VERSION:=8ff2ae59ec9840a7b8b45f976c51cae80abe0226 PKG_MAINTAINER:=Steven Barth PKG_LICENSE:=GPL-2.0 From 0ead547ab9b5e6489fce702123fb5742d803898f Mon Sep 17 00:00:00 2001 From: Markus Stenberg Date: Fri, 3 Jul 2015 07:22:40 +0300 Subject: [PATCH 04/10] hnetd: Bump. Some corner case fixes + dncp-07/hncp-07 compatibility (more or less). --- hnetd/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hnetd/Makefile b/hnetd/Makefile index ec29487..fe53c21 100644 --- a/hnetd/Makefile +++ b/hnetd/Makefile @@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hnetd -PKG_SOURCE_VERSION:=18ee17f3d18a4c0159e53e0716831bf2fbe506cd -PKG_VERSION:=2015-06-17-$(PKG_SOURCE_VERSION) +PKG_SOURCE_VERSION:=23d6a843f9960c4777ad42909611bec526513d61 +PKG_VERSION:=2015-07-02-$(PKG_SOURCE_VERSION) PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git From 96867471b7ae536e59a9d7298d419cea504f46dc Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Tue, 7 Jul 2015 16:51:36 +0800 Subject: [PATCH 05/10] batman-adv: 2015.0 bugfixes & stability updates Signed-off-by: Marek Lindner --- ...d-u32-overflow-during-gateway-select.patch | 2 +- ...n-adv-avoid-DAT-to-mess-up-LAN-state.patch | 2 +- ...v-Make-DAT-capability-changes-atomic.patch | 2 +- ...dv-Make-NC-capability-changes-atomic.patch | 2 +- ...dv-Make-TT-capability-changes-atomic.patch | 2 +- ...Make-MCAST-capability-changes-atomic.patch | 2 +- ...otential-synchronization-issues-in-m.patch | 2 +- ...ompile-error-on-deactivated-MCAST-fe.patch | 2 +- ...ernel-crash-due-to-missing-NULL-chec.patch | 2 +- ...ct-tt_local_entry-from-concurrent-de.patch | 2 +- ...tect-tt-request-from-double-deletion.patch | 2 +- ...alize-up-down-values-when-adding-a-g.patch | 2 +- ...e-broadcast-packets-scheduled-for-pu.patch | 2 +- ...-adv-Fix-broken-DAT-capability-check.patch | 53 ++++++++++++ ...n-adv-Fix-broken-NC-capability-check.patch | 53 ++++++++++++ ...n-adv-Fix-broken-TT-capability-check.patch | 54 ++++++++++++ ...dv-Fix-broken-MCAST-capability-check.patch | 82 +++++++++++++++++++ 17 files changed, 255 insertions(+), 13 deletions(-) create mode 100644 batman-adv/patches/0014-batman-adv-Fix-broken-DAT-capability-check.patch create mode 100644 batman-adv/patches/0015-batman-adv-Fix-broken-NC-capability-check.patch create mode 100644 batman-adv/patches/0016-batman-adv-Fix-broken-TT-capability-check.patch create mode 100644 batman-adv/patches/0017-batman-adv-Fix-broken-MCAST-capability-check.patch diff --git a/batman-adv/patches/0001-batman-adv-Avoid-u32-overflow-during-gateway-select.patch b/batman-adv/patches/0001-batman-adv-Avoid-u32-overflow-during-gateway-select.patch index 19eb2fb..b7232e7 100644 --- a/batman-adv/patches/0001-batman-adv-Avoid-u32-overflow-during-gateway-select.patch +++ b/batman-adv/patches/0001-batman-adv-Avoid-u32-overflow-during-gateway-select.patch @@ -1,7 +1,7 @@ From f63c54bba31d2c86269982fd8efdfb618f1daabe Mon Sep 17 00:00:00 2001 From: Ruben Wisniewski Date: Tue, 26 May 2015 18:34:27 +0200 -Subject: [PATCH 01/13] batman-adv: Avoid u32 overflow during gateway select +Subject: [PATCH 01/17] batman-adv: Avoid u32 overflow during gateway select The gateway selection based on fast connections is using a single value calculated from the average tq (0-255) and the download bandwidth (in diff --git a/batman-adv/patches/0002-batman-adv-avoid-DAT-to-mess-up-LAN-state.patch b/batman-adv/patches/0002-batman-adv-avoid-DAT-to-mess-up-LAN-state.patch index 082c097..b335f4f 100644 --- a/batman-adv/patches/0002-batman-adv-avoid-DAT-to-mess-up-LAN-state.patch +++ b/batman-adv/patches/0002-batman-adv-avoid-DAT-to-mess-up-LAN-state.patch @@ -1,7 +1,7 @@ From 9bbd794030657fe0d38590cd67d4801b989cebf9 Mon Sep 17 00:00:00 2001 From: Antonio Quartulli Date: Mon, 1 Jun 2015 17:29:57 +0200 -Subject: [PATCH 02/13] batman-adv: avoid DAT to mess up LAN state +Subject: [PATCH 02/17] batman-adv: avoid DAT to mess up LAN state When a node running DAT receives an ARP request from the LAN for the first time, it is likely that this node will request the ARP entry diff --git a/batman-adv/patches/0003-batman-adv-Make-DAT-capability-changes-atomic.patch b/batman-adv/patches/0003-batman-adv-Make-DAT-capability-changes-atomic.patch index 0f6ce8c..4152a52 100644 --- a/batman-adv/patches/0003-batman-adv-Make-DAT-capability-changes-atomic.patch +++ b/batman-adv/patches/0003-batman-adv-Make-DAT-capability-changes-atomic.patch @@ -1,7 +1,7 @@ From bfd0fbaef270ac4ed8e4457a38ef8d91190c0540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20L=C3=BCssing?= Date: Tue, 16 Jun 2015 17:10:22 +0200 -Subject: [PATCH 03/13] batman-adv: Make DAT capability changes atomic +Subject: [PATCH 03/17] batman-adv: Make DAT capability changes atomic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/batman-adv/patches/0004-batman-adv-Make-NC-capability-changes-atomic.patch b/batman-adv/patches/0004-batman-adv-Make-NC-capability-changes-atomic.patch index e69178e..935a6cd 100644 --- a/batman-adv/patches/0004-batman-adv-Make-NC-capability-changes-atomic.patch +++ b/batman-adv/patches/0004-batman-adv-Make-NC-capability-changes-atomic.patch @@ -1,7 +1,7 @@ From 586df9e2537b51c0df7ce99576c3cee1681b64de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20L=C3=BCssing?= Date: Tue, 16 Jun 2015 17:10:23 +0200 -Subject: [PATCH 04/13] batman-adv: Make NC capability changes atomic +Subject: [PATCH 04/17] batman-adv: Make NC capability changes atomic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/batman-adv/patches/0005-batman-adv-Make-TT-capability-changes-atomic.patch b/batman-adv/patches/0005-batman-adv-Make-TT-capability-changes-atomic.patch index f41b775..c6e9078 100644 --- a/batman-adv/patches/0005-batman-adv-Make-TT-capability-changes-atomic.patch +++ b/batman-adv/patches/0005-batman-adv-Make-TT-capability-changes-atomic.patch @@ -1,7 +1,7 @@ From a51fa16ecf3f079518baaa56bffae343bd5694f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20L=C3=BCssing?= Date: Tue, 16 Jun 2015 17:10:24 +0200 -Subject: [PATCH 05/13] batman-adv: Make TT capability changes atomic +Subject: [PATCH 05/17] batman-adv: Make TT capability changes atomic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/batman-adv/patches/0006-batman-adv-Make-MCAST-capability-changes-atomic.patch b/batman-adv/patches/0006-batman-adv-Make-MCAST-capability-changes-atomic.patch index 99f9038..d1d7beb 100644 --- a/batman-adv/patches/0006-batman-adv-Make-MCAST-capability-changes-atomic.patch +++ b/batman-adv/patches/0006-batman-adv-Make-MCAST-capability-changes-atomic.patch @@ -1,7 +1,7 @@ From 201a54ba710ab7f40b82ad3c109f702c47d0761f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20L=C3=BCssing?= Date: Tue, 16 Jun 2015 17:10:25 +0200 -Subject: [PATCH 06/13] batman-adv: Make MCAST capability changes atomic +Subject: [PATCH 06/17] batman-adv: Make MCAST capability changes atomic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/batman-adv/patches/0007-batman-adv-Fix-potential-synchronization-issues-in-m.patch b/batman-adv/patches/0007-batman-adv-Fix-potential-synchronization-issues-in-m.patch index 2a2496e..66d61b3 100644 --- a/batman-adv/patches/0007-batman-adv-Fix-potential-synchronization-issues-in-m.patch +++ b/batman-adv/patches/0007-batman-adv-Fix-potential-synchronization-issues-in-m.patch @@ -1,7 +1,7 @@ From 7f220ed1f063be00833bd34a013c8f3f45884031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20L=C3=BCssing?= Date: Tue, 16 Jun 2015 17:10:26 +0200 -Subject: [PATCH 07/13] batman-adv: Fix potential synchronization issues in +Subject: [PATCH 07/17] batman-adv: Fix potential synchronization issues in mcast tvlv handler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 diff --git a/batman-adv/patches/0008-batman-adv-Fix-compile-error-on-deactivated-MCAST-fe.patch b/batman-adv/patches/0008-batman-adv-Fix-compile-error-on-deactivated-MCAST-fe.patch index eff8249..c854522 100644 --- a/batman-adv/patches/0008-batman-adv-Fix-compile-error-on-deactivated-MCAST-fe.patch +++ b/batman-adv/patches/0008-batman-adv-Fix-compile-error-on-deactivated-MCAST-fe.patch @@ -1,7 +1,7 @@ From 256776ef8562744f90ac9379364df4cf88291b49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20L=C3=BCssing?= Date: Thu, 18 Jun 2015 06:47:19 +0200 -Subject: [PATCH 08/13] batman-adv: Fix compile error on deactivated MCAST +Subject: [PATCH 08/17] batman-adv: Fix compile error on deactivated MCAST feature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 diff --git a/batman-adv/patches/0009-batman-adv-fix-kernel-crash-due-to-missing-NULL-chec.patch b/batman-adv/patches/0009-batman-adv-fix-kernel-crash-due-to-missing-NULL-chec.patch index c217a93..3e19c0e 100644 --- a/batman-adv/patches/0009-batman-adv-fix-kernel-crash-due-to-missing-NULL-chec.patch +++ b/batman-adv/patches/0009-batman-adv-fix-kernel-crash-due-to-missing-NULL-chec.patch @@ -1,7 +1,7 @@ From 2c2dfd886a400057ccbc66f1507c94ed909d2a89 Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Tue, 9 Jun 2015 21:24:36 +0800 -Subject: [PATCH 09/13] batman-adv: fix kernel crash due to missing NULL checks +Subject: [PATCH 09/17] batman-adv: fix kernel crash due to missing NULL checks batadv_softif_vlan_get() may return NULL which has to be verified by the caller. diff --git a/batman-adv/patches/0010-batman-adv-protect-tt_local_entry-from-concurrent-de.patch b/batman-adv/patches/0010-batman-adv-protect-tt_local_entry-from-concurrent-de.patch index 7dc83a7..5cc27ee 100644 --- a/batman-adv/patches/0010-batman-adv-protect-tt_local_entry-from-concurrent-de.patch +++ b/batman-adv/patches/0010-batman-adv-protect-tt_local_entry-from-concurrent-de.patch @@ -1,7 +1,7 @@ From af912d77181f252e6fdd324592d006e30bc82909 Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Wed, 17 Jun 2015 20:01:36 +0800 -Subject: [PATCH 10/13] batman-adv: protect tt_local_entry from concurrent +Subject: [PATCH 10/17] batman-adv: protect tt_local_entry from concurrent delete events The tt_local_entry deletion performed in batadv_tt_local_remove() was neither diff --git a/batman-adv/patches/0011-batman-adv-protect-tt-request-from-double-deletion.patch b/batman-adv/patches/0011-batman-adv-protect-tt-request-from-double-deletion.patch index 61da936..dd0e26f 100644 --- a/batman-adv/patches/0011-batman-adv-protect-tt-request-from-double-deletion.patch +++ b/batman-adv/patches/0011-batman-adv-protect-tt-request-from-double-deletion.patch @@ -1,7 +1,7 @@ From 9bac35c1e4fab662522371f81147963e19693409 Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Mon, 22 Jun 2015 00:36:28 +0800 -Subject: [PATCH 11/13] batman-adv: protect tt request from double deletion +Subject: [PATCH 11/17] batman-adv: protect tt request from double deletion The list_del() calls were changed to list_del_init() to prevent an accidental double deletion in batadv_tt_req_node_new(). diff --git a/batman-adv/patches/0012-batman-adv-initialize-up-down-values-when-adding-a-g.patch b/batman-adv/patches/0012-batman-adv-initialize-up-down-values-when-adding-a-g.patch index 6338edc..04b3758 100644 --- a/batman-adv/patches/0012-batman-adv-initialize-up-down-values-when-adding-a-g.patch +++ b/batman-adv/patches/0012-batman-adv-initialize-up-down-values-when-adding-a-g.patch @@ -1,7 +1,7 @@ From 3c92b633715b7eca80dc7a2347e0e4dbcce1f018 Mon Sep 17 00:00:00 2001 From: Simon Wunderlich Date: Wed, 24 Jun 2015 14:50:19 +0200 -Subject: [PATCH 12/13] batman-adv: initialize up/down values when adding a +Subject: [PATCH 12/17] batman-adv: initialize up/down values when adding a gateway Without this initialization, gateways which actually announce up/down diff --git a/batman-adv/patches/0013-batman-adv-remove-broadcast-packets-scheduled-for-pu.patch b/batman-adv/patches/0013-batman-adv-remove-broadcast-packets-scheduled-for-pu.patch index da455e1..b7a27ef 100644 --- a/batman-adv/patches/0013-batman-adv-remove-broadcast-packets-scheduled-for-pu.patch +++ b/batman-adv/patches/0013-batman-adv-remove-broadcast-packets-scheduled-for-pu.patch @@ -1,7 +1,7 @@ From 07bec2d4dec83f024baf166b95cf037be3a7eca5 Mon Sep 17 00:00:00 2001 From: Simon Wunderlich Date: Wed, 24 Jun 2015 14:50:20 +0200 -Subject: [PATCH 13/13] batman-adv: remove broadcast packets scheduled for +Subject: [PATCH 13/17] batman-adv: remove broadcast packets scheduled for purged outgoing if When an interface is purged, the broadcast packets scheduled for this diff --git a/batman-adv/patches/0014-batman-adv-Fix-broken-DAT-capability-check.patch b/batman-adv/patches/0014-batman-adv-Fix-broken-DAT-capability-check.patch new file mode 100644 index 0000000..bffabb3 --- /dev/null +++ b/batman-adv/patches/0014-batman-adv-Fix-broken-DAT-capability-check.patch @@ -0,0 +1,53 @@ +From de4666781c5a64cd55aa6688f77de95f8f66b2c0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Linus=20L=C3=BCssing?= +Date: Fri, 3 Jul 2015 18:29:56 +0200 +Subject: [PATCH 14/17] batman-adv: Fix broken DAT capability check +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The introduction of set_bit() and clear_bit() calls in batman-adv +wrongly passed bitmasks and not the bit numbers to these functions. +This leads to broken capability checks. + +Fixing this by making the capability enum a non-bitmasked one and by +that passing non-masked values to set_bit()/clear_bit(). + +Fixes: bfd0fbaef270 ("batman-adv: Make DAT capability changes atomic") +Reported-by: Def +Signed-off-by: Linus Lüssing +Signed-off-by: Marek Lindner +--- + distributed-arp-table.c | 2 +- + types.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/distributed-arp-table.c b/distributed-arp-table.c +index b2cc19b..c0c514d 100644 +--- a/distributed-arp-table.c ++++ b/distributed-arp-table.c +@@ -422,7 +422,7 @@ static bool batadv_is_orig_node_eligible(struct batadv_dat_candidate *res, + int j; + + /* check if orig node candidate is running DAT */ +- if (!(candidate->capabilities & BATADV_ORIG_CAPA_HAS_DAT)) ++ if (!(test_bit(BATADV_ORIG_CAPA_HAS_DAT, &candidate->capabilities))) + goto out; + + /* Check if this node has already been selected... */ +diff --git a/types.h b/types.h +index 65dc6bf..08a6343 100644 +--- a/types.h ++++ b/types.h +@@ -299,7 +299,7 @@ struct batadv_orig_node { + * (= orig node announces a tvlv of type BATADV_TVLV_MCAST) + */ + enum batadv_orig_capabilities { +- BATADV_ORIG_CAPA_HAS_DAT = BIT(0), ++ BATADV_ORIG_CAPA_HAS_DAT, + BATADV_ORIG_CAPA_HAS_NC = BIT(1), + BATADV_ORIG_CAPA_HAS_TT = BIT(2), + BATADV_ORIG_CAPA_HAS_MCAST = BIT(3), +-- +2.1.4 + diff --git a/batman-adv/patches/0015-batman-adv-Fix-broken-NC-capability-check.patch b/batman-adv/patches/0015-batman-adv-Fix-broken-NC-capability-check.patch new file mode 100644 index 0000000..86ecd92 --- /dev/null +++ b/batman-adv/patches/0015-batman-adv-Fix-broken-NC-capability-check.patch @@ -0,0 +1,53 @@ +From dfb27e75b5586e356e88b9d827d772a6cbdf3cc1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Linus=20L=C3=BCssing?= +Date: Fri, 3 Jul 2015 18:29:57 +0200 +Subject: [PATCH 15/17] batman-adv: Fix broken NC capability check +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The introduction of set_bit() and clear_bit() calls in batman-adv +wrongly passed bitmasks and not the bit numbers to these functions. +This leads to broken capability checks. + +Fixing this by making the capability enum a non-bitmasked one and by +that passing non-masked values to set_bit()/clear_bit(). + +Fixes: 586df9e2537b ("batman-adv: Make NC capability changes atomic") +Reported-by: Def +Signed-off-by: Linus Lüssing +Signed-off-by: Marek Lindner +--- + network-coding.c | 2 +- + types.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/network-coding.c b/network-coding.c +index 3ce493e..0309c2c 100644 +--- a/network-coding.c ++++ b/network-coding.c +@@ -871,7 +871,7 @@ void batadv_nc_update_nc_node(struct batadv_priv *bat_priv, + goto out; + + /* check if orig node is network coding enabled */ +- if (!(orig_node->capabilities & BATADV_ORIG_CAPA_HAS_NC)) ++ if (!(test_bit(BATADV_ORIG_CAPA_HAS_NC, &orig_node->capabilities))) + goto out; + + /* accept ogms from 'good' neighbors and single hop neighbors */ +diff --git a/types.h b/types.h +index 08a6343..cb7ccb1 100644 +--- a/types.h ++++ b/types.h +@@ -300,7 +300,7 @@ struct batadv_orig_node { + */ + enum batadv_orig_capabilities { + BATADV_ORIG_CAPA_HAS_DAT, +- BATADV_ORIG_CAPA_HAS_NC = BIT(1), ++ BATADV_ORIG_CAPA_HAS_NC, + BATADV_ORIG_CAPA_HAS_TT = BIT(2), + BATADV_ORIG_CAPA_HAS_MCAST = BIT(3), + }; +-- +2.1.4 + diff --git a/batman-adv/patches/0016-batman-adv-Fix-broken-TT-capability-check.patch b/batman-adv/patches/0016-batman-adv-Fix-broken-TT-capability-check.patch new file mode 100644 index 0000000..5295026 --- /dev/null +++ b/batman-adv/patches/0016-batman-adv-Fix-broken-TT-capability-check.patch @@ -0,0 +1,54 @@ +From a4824ffaa200050a0b3e68101ebe074a7c45b7d5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Linus=20L=C3=BCssing?= +Date: Fri, 3 Jul 2015 18:29:58 +0200 +Subject: [PATCH 16/17] batman-adv: Fix broken TT capability check +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The introduction of set_bit() and clear_bit() calls in batman-adv +wrongly passed bitmasks and not the bit numbers to these functions. +This leads to broken capability checks. + +Fixing this by making the capability enum a non-bitmasked one and by +that passing non-masked values to set_bit()/clear_bit(). + +Fixes: a51fa16ecf3f ("batman-adv: Make TT capability changes atomic") +Reported-by: Def +Signed-off-by: Linus Lüssing +Signed-off-by: Marek Lindner +--- + translation-table.c | 3 ++- + types.h | 2 +- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/translation-table.c b/translation-table.c +index b6c0f52..d73b103 100644 +--- a/translation-table.c ++++ b/translation-table.c +@@ -3323,7 +3323,8 @@ static void batadv_tt_update_orig(struct batadv_priv *bat_priv, + bool has_tt_init; + + tt_vlan = (struct batadv_tvlv_tt_vlan_data *)tt_buff; +- has_tt_init = orig_node->capa_initialized & BATADV_ORIG_CAPA_HAS_TT; ++ has_tt_init = test_bit(BATADV_ORIG_CAPA_HAS_TT, ++ &orig_node->capa_initialized); + + /* orig table not initialised AND first diff is in the OGM OR the ttvn + * increased by one -> we can apply the attached changes +diff --git a/types.h b/types.h +index cb7ccb1..6f4486c 100644 +--- a/types.h ++++ b/types.h +@@ -301,7 +301,7 @@ struct batadv_orig_node { + enum batadv_orig_capabilities { + BATADV_ORIG_CAPA_HAS_DAT, + BATADV_ORIG_CAPA_HAS_NC, +- BATADV_ORIG_CAPA_HAS_TT = BIT(2), ++ BATADV_ORIG_CAPA_HAS_TT, + BATADV_ORIG_CAPA_HAS_MCAST = BIT(3), + }; + +-- +2.1.4 + diff --git a/batman-adv/patches/0017-batman-adv-Fix-broken-MCAST-capability-check.patch b/batman-adv/patches/0017-batman-adv-Fix-broken-MCAST-capability-check.patch new file mode 100644 index 0000000..8930543 --- /dev/null +++ b/batman-adv/patches/0017-batman-adv-Fix-broken-MCAST-capability-check.patch @@ -0,0 +1,82 @@ +From 1798ad3fb6ba72f8c6f96024b27ad27193648787 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Linus=20L=C3=BCssing?= +Date: Fri, 3 Jul 2015 18:29:59 +0200 +Subject: [PATCH 17/17] batman-adv: Fix broken MCAST capability check +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The introduction of set_bit() and clear_bit() calls in batman-adv +wrongly passed bitmasks and not the bit numbers to these functions. +This leads to broken capability checks. + +Fixing this by making the capability enum a non-bitmasked one and by +that passing non-masked values to set_bit()/clear_bit(). + +Fixes: 201a54ba710a ("batman-adv: Make MCAST capability changes atomic") +Reported-by: Def +Signed-off-by: Linus Lüssing +Signed-off-by: Marek Lindner +--- + multicast.c | 11 ++++++----- + types.h | 2 +- + 2 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/multicast.c b/multicast.c +index b75bcc3..ee8317f 100644 +--- a/multicast.c ++++ b/multicast.c +@@ -709,14 +709,15 @@ static void batadv_mcast_tvlv_ogm_handler_v1(struct batadv_priv *bat_priv, + mcast_flags = *(uint8_t *)tvlv_value; + + spin_lock_bh(&orig->mcast_handler_lock); +- orig_initialized = orig->capa_initialized & BATADV_ORIG_CAPA_HAS_MCAST; ++ orig_initialized = test_bit(BATADV_ORIG_CAPA_HAS_MCAST, ++ &orig->capa_initialized); + + /* If mcast support is turned on decrease the disabled mcast node + * counter only if we had increased it for this node before. If this + * is a completely new orig_node no need to decrease the counter. + */ + if (orig_mcast_enabled && +- !(orig->capabilities & BATADV_ORIG_CAPA_HAS_MCAST)) { ++ !(test_bit(BATADV_ORIG_CAPA_HAS_MCAST, &orig->capabilities))) { + if (orig_initialized) + atomic_dec(&bat_priv->mcast.num_disabled); + set_bit(BATADV_ORIG_CAPA_HAS_MCAST, &orig->capabilities); +@@ -725,7 +726,7 @@ static void batadv_mcast_tvlv_ogm_handler_v1(struct batadv_priv *bat_priv, + * node counter. + */ + } else if (!orig_mcast_enabled && +- (orig->capabilities & BATADV_ORIG_CAPA_HAS_MCAST || ++ (test_bit(BATADV_ORIG_CAPA_HAS_MCAST, &orig->capabilities) || + !orig_initialized)) { + atomic_inc(&bat_priv->mcast.num_disabled); + clear_bit(BATADV_ORIG_CAPA_HAS_MCAST, &orig->capabilities); +@@ -774,8 +775,8 @@ void batadv_mcast_purge_orig(struct batadv_orig_node *orig) + + spin_lock_bh(&orig->mcast_handler_lock); + +- if (!(orig->capabilities & BATADV_ORIG_CAPA_HAS_MCAST) && +- orig->capa_initialized & BATADV_ORIG_CAPA_HAS_MCAST) ++ if (!(test_bit(BATADV_ORIG_CAPA_HAS_MCAST, &orig->capabilities)) && ++ test_bit(BATADV_ORIG_CAPA_HAS_MCAST, &orig->capa_initialized)) + atomic_dec(&bat_priv->mcast.num_disabled); + + batadv_mcast_want_unsnoop_update(bat_priv, orig, BATADV_NO_FLAGS); +diff --git a/types.h b/types.h +index 6f4486c..3baf595 100644 +--- a/types.h ++++ b/types.h +@@ -302,7 +302,7 @@ enum batadv_orig_capabilities { + BATADV_ORIG_CAPA_HAS_DAT, + BATADV_ORIG_CAPA_HAS_NC, + BATADV_ORIG_CAPA_HAS_TT, +- BATADV_ORIG_CAPA_HAS_MCAST = BIT(3), ++ BATADV_ORIG_CAPA_HAS_MCAST, + }; + + /** +-- +2.1.4 + From ba83ed36057eaf7909f63e1ff63616b8624987e2 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Fri, 10 Jul 2015 08:26:12 +0200 Subject: [PATCH 06/10] hnetd: fix issues on 32-bit platforms Signed-off-by: Steven Barth --- hnetd/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hnetd/Makefile b/hnetd/Makefile index fe53c21..b9fe825 100644 --- a/hnetd/Makefile +++ b/hnetd/Makefile @@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hnetd -PKG_SOURCE_VERSION:=23d6a843f9960c4777ad42909611bec526513d61 -PKG_VERSION:=2015-07-02-$(PKG_SOURCE_VERSION) +PKG_SOURCE_VERSION:=ea2bd2bc2d8e617efca4b27fbf1c5c3c8ad09ad9 +PKG_VERSION:=2015-07-10-$(PKG_SOURCE_VERSION) PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git From 6c78c2ac2cb9ec3be25e68b1cef7b2e2e0e4a346 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Fri, 10 Jul 2015 08:26:25 +0200 Subject: [PATCH 07/10] minimalist-pcpproxy: fix uci call in default-script Signed-off-by: Steven Barth --- minimalist-pcproxy/files/minimalist-pcproxy.defaults | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/minimalist-pcproxy/files/minimalist-pcproxy.defaults b/minimalist-pcproxy/files/minimalist-pcproxy.defaults index a29d7b3..7537f8a 100644 --- a/minimalist-pcproxy/files/minimalist-pcproxy.defaults +++ b/minimalist-pcproxy/files/minimalist-pcproxy.defaults @@ -1,6 +1,6 @@ #!/bin/sh -if [ `uci get -q upnpd.config._pcproxy_configured` = "1" ] +if [ `uci -q get upnpd.config._pcproxy_configured` = "1" ] then exit fi From 7d4e4fe21d6a7315c86fb070f2aac422f3334920 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Wed, 15 Jul 2015 08:28:32 +0200 Subject: [PATCH 08/10] miniupnpd: shorten OS name to silence SSDP warnings Signed-off-by: Steven Barth --- miniupnpd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniupnpd/Makefile b/miniupnpd/Makefile index 0abe480..1822926 100644 --- a/miniupnpd/Makefile +++ b/miniupnpd/Makefile @@ -46,7 +46,7 @@ endef define Build/Prepare $(call Build/Prepare/Default) - echo "OpenWrt/$(OPENWRTVERSION)" | tr \(\)\ _ >$(PKG_BUILD_DIR)/os.openwrt + echo "OpenWrt" | tr \(\)\ _ >$(PKG_BUILD_DIR)/os.openwrt endef MAKE_FLAGS += \ From 36efb8629fd5388615e9eb24e8fe9d334a0b88bb Mon Sep 17 00:00:00 2001 From: Axel Neumann Date: Tue, 21 Jul 2015 14:24:09 +0200 Subject: [PATCH 09/10] initial BMX7 package --- bmx7/Makefile | 156 ++++++++++++++++++++++++++++++++++ bmx7/files/etc/config/bmx6 | 48 +++++++++++ bmx7/files/etc/init.d/bmx6 | 41 +++++++++ bmx7/patches/001-json-c.patch | 13 +++ 4 files changed, 258 insertions(+) create mode 100644 bmx7/Makefile create mode 100644 bmx7/files/etc/config/bmx6 create mode 100755 bmx7/files/etc/init.d/bmx6 create mode 100644 bmx7/patches/001-json-c.patch diff --git a/bmx7/Makefile b/bmx7/Makefile new file mode 100644 index 0000000..e611ffa --- /dev/null +++ b/bmx7/Makefile @@ -0,0 +1,156 @@ +# Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# The full GNU General Public License is included in this distribution in +# the file called "COPYING". +# +# Contibutors: +# Axel Neumann, Simó Albert i Beltran, Pau Escrich +# + + +include $(TOPDIR)/rules.mk + +PKG_NAME:=bmx7 + +PKG_SOURCE_PROTO:=git + +#PKG_SOURCE_URL:=git://bmx6.net/bmx6.git +PKG_SOURCE_URL:=git://github.com/axn/bmx6.git +#PKG_SOURCE_URL:=file:///home/neumann/bmx6/bmx6.git + +PKG_REV:=2865a2fe21e6dae00b43b3b91ba0625af9757c09 +PKG_VERSION:=r2015072121 +PKG_RELEASE:=4 +PKG_LICENSE:=GPL-2.0 + +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) + +include $(INCLUDE_DIR)/package.mk + +TARGET_CFLAGS += $(FPIC) + +MAKE_ARGS += \ + EXTRA_CFLAGS="$(TARGET_CFLAGS) -I. -I$(STAGING_DIR)/usr/include -DCRYPTLIB=POLARSSL_1_3_4 -DCORE_LIMIT=20000 -DTRAFFIC_DUMP -DDEBUG_MALLOC" \ + EXTRA_LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib " \ + GIT_REV="$(PKG_REV)" \ + CC="$(TARGET_CC)" \ + INSTALL_DIR="$(PKG_INSTALL_DIR)" \ + STRIP="/bin/false" \ + build_all + +define Package/bmx7/Default + SECTION:=net + CATEGORY:=Network + SUBMENU:=Routing and Redirection + TITLE:=BMX7 layer 3 routing daemon + URL:=http://bmx6.net/ + MAINTAINER:=Axel Neumann + DEPENDS:=+zlib +libpolarssl +kmod-ip6-tunnel +kmod-iptunnel6 +kmod-tun @!bmx6 +endef + +define Package/bmx7/description +BMX7 layer 3 routing daemon supporting IPv6, and IPv4 over IPv6 +endef + +define Package/bmx7 + $(call Package/bmx7/Default) + MENU:=1 +endef + +define Package/bmx7-uci-config + $(call Package/bmx7/Default) + DEPENDS:=bmx7 +libuci + TITLE:=configuration plugin based on uci (recommended!) +endef + +define Package/bmx7-json + $(call Package/bmx7/Default) + DEPENDS:=bmx7 +libjson-c + TITLE:=json plugin based on json-c +endef + +define Package/bmx7-sms + $(call Package/bmx7/Default) + DEPENDS:=bmx7 + TITLE:=sms plugin +endef + +#define Package/bmx7-quagga +# $(call Package/bmx7/Default) +# DEPENDS:=bmx7 +qmp-quagga @BROKEN +# TITLE:=bmx7 quagga plugin to redistribute/export routes (needs manet/bmx patched quagga 0.99.21) +#endef + +define Package/bmx7-table + $(call Package/bmx7/Default) + DEPENDS:=bmx7 + TITLE:=bmx7 table plugin to automatically announce routing-table routes via ip6ip tunnels +endef + +define Build/Configure + mkdir -p $(PKG_INSTALL_DIR) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_ARGS) +endef + +define Package/bmx7/install + $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bmx6 $(1)/usr/sbin/bmx6 +endef + +define Package/bmx7-uci-config/conffiles +/etc/config/bmx6 +endef + +define Package/bmx7-uci-config/install + $(INSTALL_DIR) $(1)/usr/lib $(1)/etc/config $(1)/etc/init.d + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx6_uci_config/bmx6_config.so $(1)/usr/lib/bmx6_config.so + $(INSTALL_BIN) ./files/etc/init.d/bmx6 $(1)/etc/init.d/bmx6 + $(INSTALL_DATA) ./files/etc/config/bmx6 $(1)/etc/config/bmx6 +endef + +define Package/bmx7-json/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx6_json/bmx6_json.so $(1)/usr/lib/bmx6_json.so +endef + +define Package/bmx7-sms/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx6_sms/bmx6_sms.so $(1)/usr/lib/bmx6_sms.so +endef + +define Package/bmx7-table/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx6_table/bmx6_table.so $(1)/usr/lib/bmx6_table.so +endef + +#define Package/bmx7-quagga/install +# $(INSTALL_DIR) $(1)/usr/lib +# $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx6_quagga/bmx6_quagga.so $(1)/usr/lib/bmx6_quagga.so +#endef + +$(eval $(call BuildPackage,bmx7)) +$(eval $(call BuildPackage,bmx7-uci-config)) +$(eval $(call BuildPackage,bmx7-json)) +$(eval $(call BuildPackage,bmx7-sms)) +#$(eval $(call BuildPackage,bmx7-quagga)) +$(eval $(call BuildPackage,bmx7-table)) diff --git a/bmx7/files/etc/config/bmx6 b/bmx7/files/etc/config/bmx6 new file mode 100644 index 0000000..5f7af9d --- /dev/null +++ b/bmx7/files/etc/config/bmx6 @@ -0,0 +1,48 @@ + +# for more information: +# http://bmx6.net/projects/bmx6/wiki +# options execute: bmx6 --help + +config 'bmx6' 'general' +# option 'runtimeDir' '/var/run/bmx6' + + +#config 'plugin' +# option 'plugin' 'bmx6_config.so' + +#config 'plugin' +# option 'plugin' 'bmx6_json.so' + +#config 'plugin' +# option 'plugin' 'bmx6_table.so' + +#config 'plugin' +# option 'plugin' 'bmx6_sms.so' + + +config 'dev' 'mesh_1' + option 'dev' 'br-lan' + +config 'dev' 'mesh_2' + option 'dev' 'wlan0' + +config 'tunDev' default + option 'tunDev' 'default' + option 'tun6Address' '2012:0:0:6666::1/64' + option 'tun4Address' '10.66.66.1/24' + + +#config 'tunOut' +# option 'tunOut' 'ip6' +# option 'network' '2012::/16' +# option 'exportDistance' '0' + +#config 'tunOut' +# option 'tunOut' 'ip4' +# option 'network' '10.0.0.0/9' +# option 'minPrefixLen' '27' + + + + + diff --git a/bmx7/files/etc/init.d/bmx6 b/bmx7/files/etc/init.d/bmx6 new file mode 100755 index 0000000..cb2d5b3 --- /dev/null +++ b/bmx7/files/etc/init.d/bmx6 @@ -0,0 +1,41 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# The full GNU General Public License is included in this distribution in +# the file called "COPYING". + +START=91 + +BIN=/usr/sbin/bmx6 +CONF=/etc/config/bmx6 +PID=/var/run/bmx6/pid + + +start() { + cd /root/ + while pgrep -f mac80211.sh ; do sleep 1; done + ulimit -c 20000 + $BIN -f $CONF -d0 > /dev/null & +} + +stop() { + start-stop-daemon -p $PID -K +} + +restart() { + stop; sleep 3; start +} diff --git a/bmx7/patches/001-json-c.patch b/bmx7/patches/001-json-c.patch new file mode 100644 index 0000000..5d29dae --- /dev/null +++ b/bmx7/patches/001-json-c.patch @@ -0,0 +1,13 @@ +Index: bmx6-r2014112401/lib/bmx6_json/json.c +=================================================================== +--- bmx6-r2014112401.orig/lib/bmx6_json/json.c ++++ bmx6-r2014112401/lib/bmx6_json/json.c +@@ -27,7 +27,7 @@ + #include + #include + #include +-#include ++#include + //#include + //#include + From c5a8562599ecea81a014ed8f714d61b29e12df55 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Tue, 28 Jul 2015 12:06:25 +0200 Subject: [PATCH 10/10] hnetd: bump and add tunneling support Signed-off-by: Steven Barth --- hnetd/Makefile | 32 ++++++++++++++++++++++++++------ hnetd/files/hnetd.init | 3 +++ 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/hnetd/Makefile b/hnetd/Makefile index b9fe825..03e3fb9 100644 --- a/hnetd/Makefile +++ b/hnetd/Makefile @@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hnetd -PKG_SOURCE_VERSION:=ea2bd2bc2d8e617efca4b27fbf1c5c3c8ad09ad9 -PKG_VERSION:=2015-07-10-$(PKG_SOURCE_VERSION) +PKG_SOURCE_VERSION:=a6b4b6f1f5d38646fa11064cf7394719e048bc87 +PKG_VERSION:=2015-07-28-$(PKG_SOURCE_VERSION) PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git @@ -37,7 +37,7 @@ define Package/hnetd/Default CATEGORY:=Network TITLE:=HNCP Homenet daemon - $(2) URL:=https://github.com/sbyx/hnetd - DEPENDS:=+odhcpd +odhcp6c +netifd +ip $(3) + DEPENDS:=+odhcpd +odhcp6c +netifd $(3) DEPENDS+=+@IPV6 VARIANT:=$1 endef @@ -50,7 +50,7 @@ define Package/hnet-full CATEGORY:=Network TITLE:=HNCP Homenet metapackage URL:=https://github.com/sbyx/hnetd - DEPENDS:=+hnetd-nossl +luci-app-hnet + DEPENDS:=+hnetd-nossl +luci-app-hnet +ip # Routing DEPENDS+=+babeld # Service discovery @@ -62,9 +62,23 @@ endef define Package/hnet-full-secure SECTION:=net CATEGORY:=Network - TITLE:=HNCP Homenet metapackage + TITLE:=HNCP Homenet metapackage (w/ SSL) URL:=https://github.com/sbyx/hnetd - DEPENDS:=+hnetd-openssl +luci-app-hnet + DEPENDS:=+hnetd-openssl +luci-app-hnet +ip + # Routing + DEPENDS+=+babeld + # Service discovery + DEPENDS+=+ohybridproxy + # Distributed PCP support + DEPENDS+=+miniupnpd +minimalist-pcproxy +endef + +define Package/hnet-full-l2tp + SECTION:=net + CATEGORY:=Network + TITLE:=HNCP Homenet metapackage (w/ L2TP) + URL:=https://github.com/sbyx/hnetd + DEPENDS:=+hnetd-nossl +luci-app-hnet +ip-full +kmod-l2tp-eth # Routing DEPENDS+=+babeld # Service discovery @@ -116,6 +130,11 @@ define Package/hnet-full-secure/install true endef +define Package/hnet-full-l2tp/install + $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/generic/tunnel.script $(1)/usr/sbin/hnetd-tunnel +endef + define Package/luci-app-hnet/install $(INSTALL_DIR) $(1)/usr/lib/lua/luci $(INSTALL_DIR) $(1)/www @@ -137,4 +156,5 @@ $(eval $(call BuildPackage,hnetd-nossl)) $(eval $(call BuildPackage,hnetd-openssl)) $(eval $(call BuildPackage,hnet-full)) $(eval $(call BuildPackage,hnet-full-secure)) +$(eval $(call BuildPackage,hnet-full-l2tp)) $(eval $(call BuildPackage,luci-app-hnet)) diff --git a/hnetd/files/hnetd.init b/hnetd/files/hnetd.init index 6d7d0ec..6b98b8c 100644 --- a/hnetd/files/hnetd.init +++ b/hnetd/files/hnetd.init @@ -51,6 +51,9 @@ start_service() { # Routing script procd_append_param command -r /usr/sbin/hnetd-routing + [ -x /usr/sbin/hnetd-tunnel ] && \ + procd_append_param command -t /usr/sbin/hnetd-tunnel + # Prefix assignment (pa) config_get val pa ip4prefix [ -n "$val" ] && procd_append_param command --ip4prefix $val