From abb2c3dbdb715c4198de2a24d8be8c1bcb128414 Mon Sep 17 00:00:00 2001 From: p4u Date: Fri, 10 May 2013 16:12:47 +0200 Subject: [PATCH 01/12] Update bmx6. New functionallity of tunnel creation ondemand --- bmx6/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bmx6/Makefile b/bmx6/Makefile index 689fa6f..e268bb3 100644 --- a/bmx6/Makefile +++ b/bmx6/Makefile @@ -31,8 +31,8 @@ PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=git://bmx6.net/bmx6.git #PKG_SOURCE_URL:=git://github.com/axn/bmx6.git -PKG_REV:=c0076183ce28fe15285c8faa51920e74633776fe -PKG_VERSION:=r2013041901 +PKG_REV:=f507d223636c004c8c89d7b44be61d66584175d5 +PKG_VERSION:=r2013050901 PKG_RELEASE:=4 PKG_SOURCE_VERSION:=$(PKG_REV) @@ -61,7 +61,7 @@ define Package/bmx6/Default TITLE:=BMX6 layer 3 routing daemon URL:=http://bmx6.net/ MAINTAINER:=Axel Neumann - DEPENDS:=+kmod-ip6-tunnel +kmod-iptunnel6 + DEPENDS:=+kmod-ip6-tunnel +kmod-iptunnel6 +kmod-tun endef define Package/bmx6/description @@ -94,7 +94,7 @@ endef define Package/bmx6-quagga $(call Package/bmx6/Default) - DEPENDS:=bmx6 +qmp-quagga @BROKEN + DEPENDS:=bmx6 +qmp-quagga TITLE:=bmx6 quagga plugin to redistribute/export routes (needs manet/bmx6 patched quagga 0.99.21) endef From dfb6cba921a74f1b179947d5d77035a860b3ef32 Mon Sep 17 00:00:00 2001 From: Axel Neumann Date: Fri, 10 May 2013 16:17:36 +0200 Subject: [PATCH 02/12] bmx6-testing: update testing branch --- bmx6/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bmx6/Makefile b/bmx6/Makefile index e268bb3..87e573a 100644 --- a/bmx6/Makefile +++ b/bmx6/Makefile @@ -31,8 +31,8 @@ PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=git://bmx6.net/bmx6.git #PKG_SOURCE_URL:=git://github.com/axn/bmx6.git -PKG_REV:=f507d223636c004c8c89d7b44be61d66584175d5 -PKG_VERSION:=r2013050901 +PKG_REV:=0a761a621b203af6c9edcd94872f91c1c60fa383 +PKG_VERSION:=r2013051001 PKG_RELEASE:=4 PKG_SOURCE_VERSION:=$(PKG_REV) From cd3d9b2d1d5d57d6b83bcba5140fea123067abd1 Mon Sep 17 00:00:00 2001 From: Axel Neumann Date: Mon, 17 Jun 2013 00:04:56 +0200 Subject: [PATCH 03/12] bmx6/Makefile: update testing new config style --- bmx6/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bmx6/Makefile b/bmx6/Makefile index 8786a3f..8fa8d52 100644 --- a/bmx6/Makefile +++ b/bmx6/Makefile @@ -31,8 +31,8 @@ PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=git://bmx6.net/bmx6.git #PKG_SOURCE_URL:=git://github.com/axn/bmx6.git -PKG_REV:=60adcbd4655ccf36a407bae58d66914e33f05a41 -PKG_VERSION:=r2013060803 +PKG_REV:=bef6b7e805ced794a8b00a34d510c061d9108ecc +PKG_VERSION:=r2013061601 PKG_RELEASE:=4 PKG_SOURCE_VERSION:=$(PKG_REV) From b493828d75c23d2733fafd317c9d5859959d8c3f Mon Sep 17 00:00:00 2001 From: p4u Date: Fri, 19 Jul 2013 01:09:17 +0200 Subject: [PATCH 04/12] Adapt tunnels web view to new bmx6 syntax and options --- .../files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm b/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm index 1b7ce42..d4cc38b 100644 --- a/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm +++ b/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm @@ -71,7 +71,8 @@ <%:IP metric%> <%:Tun metric%> <%:Bonus%> - <%:search id%> + <%:Src%> + <%:Search id%>
<%:Collecting data...%>
@@ -89,15 +90,15 @@ var res = Array(); for ( var k in st.tunnels ){ var tunnel = st.tunnels[k]; - var nodename = tunnel.remoteId.replace(/\..+$/,''); + var nodename = tunnel.remoteName.replace(/\..+$/,''); var advnet = tunnel.advNet; var status = ''; if ( tunnel.tunName != "---" ) status = ''; if ( advnet == "0.0.0.0/0" ) advnet = "Internet"; - res.push([status, tunnel.name, nodename, advnet, tunnel.advBw, tunnel.searchNet, tunnel.advType, - tunnel.pathMtc, tunnel.ipMtc, tunnel.tunMtc, tunnel.bonus, tunnel.searchId]); + res.push([status, tunnel.name, nodename, advnet, tunnel.advBw, tunnel.net, tunnel.advType, + tunnel.pathMtc, tunnel.ipMtc, tunnel.tunMtc, tunnel.bonus, tunnel.srcIngress, tunnel.id]); } return res; }); From 2812231fa4d81e7e9e2fc4a6f2980b91a007253d Mon Sep 17 00:00:00 2001 From: Axel Neumann Date: Sat, 3 Aug 2013 22:04:51 +0200 Subject: [PATCH 05/12] bmx6: update to 5fbbc59b (current master tip) --- bmx6/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bmx6/Makefile b/bmx6/Makefile index 90f4123..94aa1ed 100644 --- a/bmx6/Makefile +++ b/bmx6/Makefile @@ -31,8 +31,8 @@ PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=git://bmx6.net/bmx6.git #PKG_SOURCE_URL:=git://github.com/axn/bmx6.git -PKG_REV:=60adcbd4655ccf36a407bae58d66914e33f05a41 -PKG_VERSION:=r2013073001 +PKG_REV:=5fbbc59b186b3af753b29125ffeb739a68de7999 +PKG_VERSION:=r2013080301 PKG_RELEASE:=4 PKG_SOURCE_VERSION:=$(PKG_REV) From ab61aa8a249c25f28936d1cce8907424e43e96c4 Mon Sep 17 00:00:00 2001 From: Axel Neumann Date: Sat, 3 Aug 2013 22:17:13 +0200 Subject: [PATCH 06/12] bmx6: update to d1464ee4 (current testing tip) --- bmx6/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bmx6/Makefile b/bmx6/Makefile index 8fa8d52..01ff968 100644 --- a/bmx6/Makefile +++ b/bmx6/Makefile @@ -31,8 +31,8 @@ PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=git://bmx6.net/bmx6.git #PKG_SOURCE_URL:=git://github.com/axn/bmx6.git -PKG_REV:=bef6b7e805ced794a8b00a34d510c061d9108ecc -PKG_VERSION:=r2013061601 +PKG_REV:=d1464ee465b8096353773b32afba8b233f90fecf +PKG_VERSION:=r2013080303 PKG_RELEASE:=4 PKG_SOURCE_VERSION:=$(PKG_REV) From 6360d4c977b6b8fb6b0c80e0fcd29f43e0cc1cba Mon Sep 17 00:00:00 2001 From: Axel Neumann Date: Sun, 4 Aug 2013 08:28:44 +0200 Subject: [PATCH 07/12] Revert "Adapt tunnels web view to new bmx6 syntax and options" This reverts commit b493828d75c23d2733fafd317c9d5859959d8c3f. --- .../files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm b/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm index d4cc38b..1b7ce42 100644 --- a/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm +++ b/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm @@ -71,8 +71,7 @@ <%:IP metric%> <%:Tun metric%> <%:Bonus%> - <%:Src%> - <%:Search id%> + <%:search id%>
<%:Collecting data...%>
@@ -90,15 +89,15 @@ var res = Array(); for ( var k in st.tunnels ){ var tunnel = st.tunnels[k]; - var nodename = tunnel.remoteName.replace(/\..+$/,''); + var nodename = tunnel.remoteId.replace(/\..+$/,''); var advnet = tunnel.advNet; var status = ''; if ( tunnel.tunName != "---" ) status = ''; if ( advnet == "0.0.0.0/0" ) advnet = "Internet"; - res.push([status, tunnel.name, nodename, advnet, tunnel.advBw, tunnel.net, tunnel.advType, - tunnel.pathMtc, tunnel.ipMtc, tunnel.tunMtc, tunnel.bonus, tunnel.srcIngress, tunnel.id]); + res.push([status, tunnel.name, nodename, advnet, tunnel.advBw, tunnel.searchNet, tunnel.advType, + tunnel.pathMtc, tunnel.ipMtc, tunnel.tunMtc, tunnel.bonus, tunnel.searchId]); } return res; }); From 21cb637b0f9940d8069057f40ca472b29fa2ffc7 Mon Sep 17 00:00:00 2001 From: Axel Neumann Date: Sun, 4 Aug 2013 16:52:07 +0200 Subject: [PATCH 08/12] bmx6: fixing 501559 crash ? --- bmx6/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bmx6/Makefile b/bmx6/Makefile index 01ff968..533b56f 100644 --- a/bmx6/Makefile +++ b/bmx6/Makefile @@ -31,8 +31,8 @@ PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=git://bmx6.net/bmx6.git #PKG_SOURCE_URL:=git://github.com/axn/bmx6.git -PKG_REV:=d1464ee465b8096353773b32afba8b233f90fecf -PKG_VERSION:=r2013080303 +PKG_REV:=1d022e3f0ae0a2954c90b18fdfbcc178d7437605 +PKG_VERSION:=r2013080406 PKG_RELEASE:=4 PKG_SOURCE_VERSION:=$(PKG_REV) From 60296fff418fa473394e4c5187c2072b9b47d2e8 Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Thu, 15 Aug 2013 17:36:37 +0800 Subject: [PATCH 09/12] batman-adv: 2013.3.0 updated stability fixes Signed-off-by: Marek Lindner --- batman-adv/Makefile | 2 +- ...otential-kernel-paging-errors-for-un.patch | 203 ++++++++++++++++++ 2 files changed, 204 insertions(+), 1 deletion(-) create mode 100644 batman-adv/patches/0001-batman-adv-fix-potential-kernel-paging-errors-for-un.patch diff --git a/batman-adv/Makefile b/batman-adv/Makefile index 6db66a6..f8dfead 100644 --- a/batman-adv/Makefile +++ b/batman-adv/Makefile @@ -12,7 +12,7 @@ PKG_NAME:=batman-adv PKG_VERSION:=2013.3.0 BATCTL_VERSION:=2013.3.0 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_MD5SUM:=d070c0879cd8fe8125315a4566fabd2d BATCTL_MD5SUM:=747535b0296f0013a6f99373a51d41fc diff --git a/batman-adv/patches/0001-batman-adv-fix-potential-kernel-paging-errors-for-un.patch b/batman-adv/patches/0001-batman-adv-fix-potential-kernel-paging-errors-for-un.patch new file mode 100644 index 0000000..d16dce4 --- /dev/null +++ b/batman-adv/patches/0001-batman-adv-fix-potential-kernel-paging-errors-for-un.patch @@ -0,0 +1,203 @@ +From c98c3e521913b8dd5fee4d3b90dc9ed7a47e5bee Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Linus=20L=C3=BCssing?= +Date: Tue, 6 Aug 2013 20:21:15 +0200 +Subject: [PATCH] batman-adv: fix potential kernel paging errors for unicast + transmissions +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +There are several functions which might reallocate skb data. Currently +some places keep reusing their old ethhdr pointer regardless of whether +they became invalid after such a reallocation or not. This potentially +leads to kernel paging errors. + +This patch fixes these by refetching the ethdr pointer after the +potential reallocations. + +Signed-off-by: Linus Lüssing +Signed-off-by: Marek Lindner +--- + bridge_loop_avoidance.c | 2 ++ + gateway_client.c | 13 ++++++++++++- + gateway_client.h | 3 +-- + soft-interface.c | 9 ++++++++- + unicast.c | 13 ++++++++++--- + 5 files changed, 33 insertions(+), 7 deletions(-) + +diff --git a/bridge_loop_avoidance.c b/bridge_loop_avoidance.c +index e14531f..264de88 100644 +--- a/bridge_loop_avoidance.c ++++ b/bridge_loop_avoidance.c +@@ -1529,6 +1529,8 @@ out: + * in these cases, the skb is further handled by this function and + * returns 1, otherwise it returns 0 and the caller shall further + * process the skb. ++ * ++ * This call might reallocate skb data. + */ + int batadv_bla_tx(struct batadv_priv *bat_priv, struct sk_buff *skb, + unsigned short vid) +diff --git a/gateway_client.c b/gateway_client.c +index f105219..7614af3 100644 +--- a/gateway_client.c ++++ b/gateway_client.c +@@ -508,6 +508,7 @@ out: + return 0; + } + ++/* this call might reallocate skb data */ + static bool batadv_is_type_dhcprequest(struct sk_buff *skb, int header_len) + { + int ret = false; +@@ -568,6 +569,7 @@ out: + return ret; + } + ++/* this call might reallocate skb data */ + bool batadv_gw_is_dhcp_target(struct sk_buff *skb, unsigned int *header_len) + { + struct ethhdr *ethhdr; +@@ -619,6 +621,12 @@ bool batadv_gw_is_dhcp_target(struct sk_buff *skb, unsigned int *header_len) + + if (!pskb_may_pull(skb, *header_len + sizeof(*udphdr))) + return false; ++ ++ /* skb->data might have been reallocated by pskb_may_pull() */ ++ ethhdr = (struct ethhdr *)skb->data; ++ if (ntohs(ethhdr->h_proto) == ETH_P_8021Q) ++ ethhdr = (struct ethhdr *)(skb->data + VLAN_HLEN); ++ + udphdr = (struct udphdr *)(skb->data + *header_len); + *header_len += sizeof(*udphdr); + +@@ -634,12 +642,14 @@ bool batadv_gw_is_dhcp_target(struct sk_buff *skb, unsigned int *header_len) + return true; + } + ++/* this call might reallocate skb data */ + bool batadv_gw_out_of_range(struct batadv_priv *bat_priv, +- struct sk_buff *skb, struct ethhdr *ethhdr) ++ struct sk_buff *skb) + { + struct batadv_neigh_node *neigh_curr = NULL, *neigh_old = NULL; + struct batadv_orig_node *orig_dst_node = NULL; + struct batadv_gw_node *curr_gw = NULL; ++ struct ethhdr *ethhdr; + bool ret, out_of_range = false; + unsigned int header_len = 0; + uint8_t curr_tq_avg; +@@ -648,6 +658,7 @@ bool batadv_gw_out_of_range(struct batadv_priv *bat_priv, + if (!ret) + goto out; + ++ ethhdr = (struct ethhdr *)skb->data; + orig_dst_node = batadv_transtable_search(bat_priv, ethhdr->h_source, + ethhdr->h_dest); + if (!orig_dst_node) +diff --git a/gateway_client.h b/gateway_client.h +index 039902d..1037d75 100644 +--- a/gateway_client.h ++++ b/gateway_client.h +@@ -34,7 +34,6 @@ void batadv_gw_node_delete(struct batadv_priv *bat_priv, + void batadv_gw_node_purge(struct batadv_priv *bat_priv); + int batadv_gw_client_seq_print_text(struct seq_file *seq, void *offset); + bool batadv_gw_is_dhcp_target(struct sk_buff *skb, unsigned int *header_len); +-bool batadv_gw_out_of_range(struct batadv_priv *bat_priv, +- struct sk_buff *skb, struct ethhdr *ethhdr); ++bool batadv_gw_out_of_range(struct batadv_priv *bat_priv, struct sk_buff *skb); + + #endif /* _NET_BATMAN_ADV_GATEWAY_CLIENT_H_ */ +diff --git a/soft-interface.c b/soft-interface.c +index 700d0b4..0f04e1c 100644 +--- a/soft-interface.c ++++ b/soft-interface.c +@@ -180,6 +180,9 @@ static int batadv_interface_tx(struct sk_buff *skb, + if (batadv_bla_tx(bat_priv, skb, vid)) + goto dropped; + ++ /* skb->data might have been reallocated by batadv_bla_tx() */ ++ ethhdr = (struct ethhdr *)skb->data; ++ + /* Register the client MAC in the transtable */ + if (!is_multicast_ether_addr(ethhdr->h_source)) + batadv_tt_local_add(soft_iface, ethhdr->h_source, skb->skb_iif); +@@ -220,6 +223,10 @@ static int batadv_interface_tx(struct sk_buff *skb, + default: + break; + } ++ ++ /* reminder: ethhdr might have become unusable from here on ++ * (batadv_gw_is_dhcp_target() might have reallocated skb data) ++ */ + } + + /* ethernet packet should be broadcasted */ +@@ -266,7 +273,7 @@ static int batadv_interface_tx(struct sk_buff *skb, + /* unicast packet */ + } else { + if (atomic_read(&bat_priv->gw_mode) != BATADV_GW_MODE_OFF) { +- ret = batadv_gw_out_of_range(bat_priv, skb, ethhdr); ++ ret = batadv_gw_out_of_range(bat_priv, skb); + if (ret) + goto dropped; + } +diff --git a/unicast.c b/unicast.c +index dc8b5d4..688a041 100644 +--- a/unicast.c ++++ b/unicast.c +@@ -326,7 +326,9 @@ static bool batadv_unicast_push_and_fill_skb(struct sk_buff *skb, int hdr_size, + * @skb: the skb containing the payload to encapsulate + * @orig_node: the destination node + * +- * Returns false if the payload could not be encapsulated or true otherwise ++ * Returns false if the payload could not be encapsulated or true otherwise. ++ * ++ * This call might reallocate skb data. + */ + static bool batadv_unicast_prepare_skb(struct sk_buff *skb, + struct batadv_orig_node *orig_node) +@@ -343,7 +345,9 @@ static bool batadv_unicast_prepare_skb(struct sk_buff *skb, + * @orig_node: the destination node + * @packet_subtype: the batman 4addr packet subtype to use + * +- * Returns false if the payload could not be encapsulated or true otherwise ++ * Returns false if the payload could not be encapsulated or true otherwise. ++ * ++ * This call might reallocate skb data. + */ + bool batadv_unicast_4addr_prepare_skb(struct batadv_priv *bat_priv, + struct sk_buff *skb, +@@ -401,7 +405,7 @@ int batadv_unicast_generic_send_skb(struct batadv_priv *bat_priv, + struct batadv_neigh_node *neigh_node; + int data_len = skb->len; + int ret = NET_RX_DROP; +- unsigned int dev_mtu; ++ unsigned int dev_mtu, header_len; + + /* get routing information */ + if (is_multicast_ether_addr(ethhdr->h_dest)) { +@@ -429,10 +433,12 @@ find_router: + switch (packet_type) { + case BATADV_UNICAST: + batadv_unicast_prepare_skb(skb, orig_node); ++ header_len = sizeof(struct batadv_unicast_packet); + break; + case BATADV_UNICAST_4ADDR: + batadv_unicast_4addr_prepare_skb(bat_priv, skb, orig_node, + packet_subtype); ++ header_len = sizeof(struct batadv_unicast_4addr_packet); + break; + default: + /* this function supports UNICAST and UNICAST_4ADDR only. It +@@ -441,6 +447,7 @@ find_router: + goto out; + } + ++ ethhdr = (struct ethhdr *)(skb->data + header_len); + unicast_packet = (struct batadv_unicast_packet *)skb->data; + + /* inform the destination node that we are still missing a correct route +-- +1.7.10.4 + From 672a7cfb6f63a1db792bbab09ea36ab7544e6e34 Mon Sep 17 00:00:00 2001 From: Axel Neumann Date: Sat, 17 Aug 2013 13:57:44 +0200 Subject: [PATCH 10/12] Revert "Revert "Adapt tunnels web view to new bmx6 syntax and options"" This reverts commit 6360d4c977b6b8fb6b0c80e0fcd29f43e0cc1cba. --- .../files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm b/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm index 1b7ce42..d4cc38b 100644 --- a/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm +++ b/luci-app-bmx6/files/usr/lib/lua/luci/view/bmx6/tunnels_j.htm @@ -71,7 +71,8 @@ <%:IP metric%> <%:Tun metric%> <%:Bonus%> - <%:search id%> + <%:Src%> + <%:Search id%>
<%:Collecting data...%>
@@ -89,15 +90,15 @@ var res = Array(); for ( var k in st.tunnels ){ var tunnel = st.tunnels[k]; - var nodename = tunnel.remoteId.replace(/\..+$/,''); + var nodename = tunnel.remoteName.replace(/\..+$/,''); var advnet = tunnel.advNet; var status = ''; if ( tunnel.tunName != "---" ) status = ''; if ( advnet == "0.0.0.0/0" ) advnet = "Internet"; - res.push([status, tunnel.name, nodename, advnet, tunnel.advBw, tunnel.searchNet, tunnel.advType, - tunnel.pathMtc, tunnel.ipMtc, tunnel.tunMtc, tunnel.bonus, tunnel.searchId]); + res.push([status, tunnel.name, nodename, advnet, tunnel.advBw, tunnel.net, tunnel.advType, + tunnel.pathMtc, tunnel.ipMtc, tunnel.tunMtc, tunnel.bonus, tunnel.srcIngress, tunnel.id]); } return res; }); From f76074d42429a26b73976b3a5c799a895fd2d1d7 Mon Sep 17 00:00:00 2001 From: Simon Wunderlich Date: Mon, 19 Aug 2013 23:17:18 +0200 Subject: [PATCH 11/12] alfred: add alfred 2013.3.0 to feed Add A.L.F.R.E.D - Almighty Lightweight Fact Remote Exchange Daemon to the OpenWRT routing feed. This package contains the latest stable release of alfred which has been recently published by the open-mesh.org community. A description follows below. alfred is a user space daemon for distributing arbitrary local information over the mesh/network in a decentralized fashion. This data can be anything which appears to be useful - originally designed to replace the batman-adv visualization (vis), you may distribute hostnames, phone books, administration information, DNS information, the local weather forecast ... alfred runs as daemon in the background of the system. A user may insert information by using the alfred binary on the command line, or use special programs to communicate with alfred (done via unix sockets). alfred then takes care of distributing the local information to other alfred servers on other nodes. This is done via IPv6 link-local multicast, and does not require any configuration. A user can request data from alfred, and will receive the information available from all alfred servers in the network. Signed-off-by: Simon Wunderlich --- alfred/Config.in | 7 ++++ alfred/Makefile | 79 +++++++++++++++++++++++++++++++++++++ alfred/files/alfred.config | 7 ++++ alfred/files/alfred.init | 81 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 174 insertions(+) create mode 100644 alfred/Config.in create mode 100644 alfred/Makefile create mode 100644 alfred/files/alfred.config create mode 100755 alfred/files/alfred.init diff --git a/alfred/Config.in b/alfred/Config.in new file mode 100644 index 0000000..fd664ca --- /dev/null +++ b/alfred/Config.in @@ -0,0 +1,7 @@ + +config PACKAGE_ALFRED_VIS + bool "enable vis server for alfred" + depends on PACKAGE_alfred + default y + + diff --git a/alfred/Makefile b/alfred/Makefile new file mode 100644 index 0000000..db9c71f --- /dev/null +++ b/alfred/Makefile @@ -0,0 +1,79 @@ +# +# Copyright (C) 2013 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +# +# The latest alfred git hash in PKG_REV can be obtained from http://git.open-mesh.org/alfred.git +# +PKG_NAME:=alfred +PKG_VERSION:=2013.3.0 +PKG_RELEASE:=0 +PKG_MD5SUM:=018ef6262cdd11e900af31d71a864b13 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +init-y := alfred + +define Package/alfred + URL:=http://www.open-mesh.org/ + SECTION:=net + CATEGORY:=Network + TITLE:=A.L.F.R.E.D. - Almighty Lightweight Fact Remote Exchange Daemon + DEPENDS:= +libc +IPV6:kmod-ipv6 +librt +endef + +define Package/alfred/description +alfred is a user space daemon for distributing arbitrary local information over +the mesh/network in a decentralized fashion. This data can be anything which +appears to be useful - originally designed to replace the batman-adv +visualization (vis), you may distribute hostnames, phone books, administration +information, DNS information, the local weather forecast ... + +alfred runs as daemon in the background of the system. A user may insert +information by using the alfred binary on the command line, or use special +programs to communicate with alfred (done via unix sockets). alfred then takes +care of distributing the local information to other alfred servers on other +nodes. This is done via IPv6 link-local multicast, and does not require any +configuration. A user can request data from alfred, and will receive the +information available from all alfred servers in the network. +endef + +define Package/alfred/conffiles +/etc/config/alfred +endef + +define Package/alfred/config + source "$(SOURCE)/Config.in" +endef + +MAKE_ALFRED_FLAGS=\ + CONFIG_ALFRED_VIS=$(if $(CONFIG_PACKAGE_ALFRED_VIS),y,n) + +TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto +TARGET_LDFLAGS += -Wl,--gc-sections -fuse-linker-plugin + +define Build/Compile + CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) $(MAKE_ALFRED_FLAGS) all +endef + +define Package/alfred/install + $(INSTALL_DIR) $(1)/usr/sbin + cp -fpR $(PKG_BUILD_DIR)/alfred $(1)/usr/sbin/ + [ "x$(CONFIG_PACKAGE_ALFRED_VIS)" == "xy" ] && cp -fpR $(PKG_BUILD_DIR)/vis/vis $(1)/usr/sbin/ ; true + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/alfred.init $(1)/etc/init.d/alfred + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/alfred.config $(1)/etc/config/alfred +endef + +$(eval $(call BuildPackage,alfred)) diff --git a/alfred/files/alfred.config b/alfred/files/alfred.config new file mode 100644 index 0000000..b8fa9b2 --- /dev/null +++ b/alfred/files/alfred.config @@ -0,0 +1,7 @@ +config 'alfred' 'alfred' + option interface 'br-lan' + option mode 'master' + option batmanif 'bat0' + option start_vis '1' +# REMOVE THIS LINE TO ENABLE ALFRED + option disabled '1' diff --git a/alfred/files/alfred.init b/alfred/files/alfred.init new file mode 100755 index 0000000..56818d8 --- /dev/null +++ b/alfred/files/alfred.init @@ -0,0 +1,81 @@ +#!/bin/sh /etc/rc.common + +# +# Copyright (C) 2013 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +START=99 +STOP=99 +alfred_args="" +vis_args="" +pid_file_alfred="/var/run/alfred.pid" +pid_file_vis="/var/run/vis.pid" +enable=0 +vis_enable=0 +SERVICE_DAEMONIZE=1 +SERVICE_WRITE_PID=1 + +alfred_start() +{ + local args="" + local section="$1" + local disabled interface mode batmanif + + # check if section is disabled + config_get_bool disabled "$section" disabled 0 + [ $disabled = 0 ] || return 1 + + args="" + + config_get interface "$section" interface + append args "-i $interface" + + config_get mode "$section" mode + [ "$mode" = "master" ] && append args "-m" + + config_get batmanif "$section" batmanif + append args "-b $batmanif" + + append alfred_args "$args" + enable=1 + + config_get_bool start_vis "$section" start_vis 0 + if [ "$start_vis" = 1 ] && [ -x /usr/sbin/vis ]; then + vis_enable=1 + append vis_args "-i $batmanif -s" + fi + + return 0 +} + +start() +{ + config_load "alfred" + config_foreach alfred_start alfred + + if [ "$enable" = "0" ]; then + exit 0 + fi + echo "${initscript}: starting alfred" + SERVICE_PID_FILE="$pid_file_alfred" + service_start /usr/sbin/alfred ${alfred_args} + + if [ "$vis_enable" = "0" ]; then + exit 0 + fi + echo "${initscript}: starting vis" + SERVICE_PID_FILE="$pid_file_vis" + service_start /usr/sbin/vis ${vis_args} +} + +stop() +{ + SERVICE_PID_FILE="$pid_file_alfred" + service_stop /usr/sbin/alfred + SERVICE_PID_FILE="$pid_file_vis" + [ -x /usr/sbin/vis ] && service_stop /usr/sbin/vis + +} From 5e687f93455c1fa8864ff0c5d57a23a3b4958f4d Mon Sep 17 00:00:00 2001 From: Saverio Proto Date: Tue, 20 Aug 2013 14:14:43 +0200 Subject: [PATCH 12/12] olsrd: version bump to 0.6.6 --- olsrd/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/olsrd/Makefile b/olsrd/Makefile index c1ca224..b443eca 100644 --- a/olsrd/Makefile +++ b/olsrd/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=olsrd -PKG_VERSION:=0.6.5.4 +PKG_VERSION:=0.6.6 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.olsr.org/releases/0.6 -PKG_MD5SUM:=44689e790359f9363e5ebb924c548730 +PKG_MD5SUM:=f98e5a10f1842f6028023da114bf1e1a PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk