[packages] olsrd: Version Bump 0.6.3
CHANGELOG: (details in GIT on olsrd.org ) * PUD plugin (position update plugin) * JSONinfo plugin * sgwdynspeed plugin (select dynamic smart gateway based on gw speed) * Update on Quagga plugin (for new Quagga) * Fixes for Androids * Some fixes for GTK and Win32 gui * Lots of core fixes to support new compiler warnings git-svn-id: svn://svn.openwrt.org/openwrt/packages@32124 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
800460e60f
commit
ba37d59555
@ -8,13 +8,13 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=olsrd
|
PKG_NAME:=olsrd
|
||||||
PKG_VERSION:=0.6.2
|
PKG_VERSION:=0.6.3
|
||||||
PKG_RELEASE:=4
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
PKG_SOURCE_URL:=http://www.olsr.org/releases/0.6
|
PKG_SOURCE_URL:=http://www.olsr.org/releases/0.6
|
||||||
PKG_MD5SUM:=1f55bbbaf0737364b53daaeecc2cd50c
|
|
||||||
|
|
||||||
|
PKG_MD5SUM:=b28ed2e3dc6c529ab690f1c805ad32a2
|
||||||
PKG_BUILD_PARALLEL:=1
|
PKG_BUILD_PARALLEL:=1
|
||||||
PKG_INSTALL:=1
|
PKG_INSTALL:=1
|
||||||
|
|
||||||
@ -77,10 +77,16 @@ define Package/olsrd-mod-httpinfo
|
|||||||
TITLE:=Small informative web server plugin
|
TITLE:=Small informative web server plugin
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/olsrd-mod-jsoninfo
|
||||||
|
$(call Package/olsrd/template)
|
||||||
|
DEPENDS:=olsrd
|
||||||
|
TITLE:=Small informative plugin with JSON output
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/olsrd-mod-mdns
|
define Package/olsrd-mod-mdns
|
||||||
$(call Package/olsrd/template)
|
$(call Package/olsrd/template)
|
||||||
DEPENDS:=olsrd
|
DEPENDS:=olsrd
|
||||||
TITLE:=Multicast DNS plugin
|
TITLE:=MDNS/Zeroconf/Bonjour packet distribution
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/olsrd-mod-nameservice
|
define Package/olsrd-mod-nameservice
|
||||||
@ -95,6 +101,13 @@ define Package/olsrd-mod-p2pd
|
|||||||
TITLE:=Peer to Peer Discovery plugin
|
TITLE:=Peer to Peer Discovery plugin
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
define Package/olsrd-mod-pgraph
|
||||||
|
$(call Package/olsrd/template)
|
||||||
|
DEPENDS:=olsrd
|
||||||
|
TITLE:=output network topology for pgraph
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/olsrd-mod-quagga
|
define Package/olsrd-mod-quagga
|
||||||
$(call Package/olsrd/template)
|
$(call Package/olsrd/template)
|
||||||
DEPENDS:=olsrd
|
DEPENDS:=olsrd
|
||||||
@ -107,6 +120,12 @@ define Package/olsrd-mod-secure
|
|||||||
TITLE:=Message signing plugin to secure routing domain
|
TITLE:=Message signing plugin to secure routing domain
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/olsrd-mod-tas
|
||||||
|
$(call Package/olsrd/template)
|
||||||
|
DEPENDS:=olsrd
|
||||||
|
TITLE:=tas - tiny appliation server programming example
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/olsrd-mod-txtinfo
|
define Package/olsrd-mod-txtinfo
|
||||||
$(call Package/olsrd/template)
|
$(call Package/olsrd/template)
|
||||||
DEPENDS:=olsrd
|
DEPENDS:=olsrd
|
||||||
@ -129,7 +148,7 @@ MAKE_FLAGS+= \
|
|||||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||||
STRIP="true" \
|
STRIP="true" \
|
||||||
INSTALL_LIB="true" \
|
INSTALL_LIB="true" \
|
||||||
SUBDIRS="arprefresh bmf dot_draw dyn_gw dyn_gw_plain httpinfo mdns nameservice p2pd quagga secure txtinfo watchdog"
|
SUBDIRS="arprefresh bmf dot_draw dyn_gw dyn_gw_plain httpinfo jsoninfo mdns nameservice p2pd pgraph quagga secure tas txtinfo watchdog"
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
$(call Build/Compile/Default,all)
|
$(call Build/Compile/Default,all)
|
||||||
@ -180,6 +199,11 @@ define Package/olsrd-mod-httpinfo/install
|
|||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/httpinfo/olsrd_httpinfo.so.* $(1)/usr/lib/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/httpinfo/olsrd_httpinfo.so.* $(1)/usr/lib/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/olsrd-mod-jsoninfo/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/jsoninfo/olsrd_jsoninfo.so.* $(1)/usr/lib/
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/olsrd-mod-mdns/install
|
define Package/olsrd-mod-mdns/install
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/mdns/olsrd_mdns.so.* $(1)/usr/lib/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/mdns/olsrd_mdns.so.* $(1)/usr/lib/
|
||||||
@ -195,6 +219,11 @@ define Package/olsrd-mod-p2pd/install
|
|||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/p2pd/olsrd_p2pd.so.* $(1)/usr/lib/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/p2pd/olsrd_p2pd.so.* $(1)/usr/lib/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/olsrd-mod-pgraph/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/pgraph/olsrd_pgraph.so.* $(1)/usr/lib/
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/olsrd-mod-quagga/install
|
define Package/olsrd-mod-quagga/install
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/quagga/olsrd_quagga.so.* $(1)/usr/lib/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/quagga/olsrd_quagga.so.* $(1)/usr/lib/
|
||||||
@ -207,6 +236,11 @@ define Package/olsrd-mod-secure/install
|
|||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/secure/olsrd_secure.so.* $(1)/usr/lib/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/secure/olsrd_secure.so.* $(1)/usr/lib/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/olsrd-mod-tas/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/tas/olsrd_tas.so.* $(1)/usr/lib/
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/olsrd-mod-txtinfo/install
|
define Package/olsrd-mod-txtinfo/install
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/txtinfo/olsrd_txtinfo.so.* $(1)/usr/lib/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/txtinfo/olsrd_txtinfo.so.* $(1)/usr/lib/
|
||||||
@ -224,10 +258,13 @@ $(eval $(call BuildPackage,olsrd-mod-bmf))
|
|||||||
$(eval $(call BuildPackage,olsrd-mod-dyn-gw))
|
$(eval $(call BuildPackage,olsrd-mod-dyn-gw))
|
||||||
$(eval $(call BuildPackage,olsrd-mod-dyn-gw-plain))
|
$(eval $(call BuildPackage,olsrd-mod-dyn-gw-plain))
|
||||||
$(eval $(call BuildPackage,olsrd-mod-httpinfo))
|
$(eval $(call BuildPackage,olsrd-mod-httpinfo))
|
||||||
|
$(eval $(call BuildPackage,olsrd-mod-jsoninfo))
|
||||||
$(eval $(call BuildPackage,olsrd-mod-mdns))
|
$(eval $(call BuildPackage,olsrd-mod-mdns))
|
||||||
$(eval $(call BuildPackage,olsrd-mod-nameservice))
|
$(eval $(call BuildPackage,olsrd-mod-nameservice))
|
||||||
$(eval $(call BuildPackage,olsrd-mod-p2pd))
|
$(eval $(call BuildPackage,olsrd-mod-p2pd))
|
||||||
|
$(eval $(call BuildPackage,olsrd-mod-pgraph))
|
||||||
$(eval $(call BuildPackage,olsrd-mod-quagga))
|
$(eval $(call BuildPackage,olsrd-mod-quagga))
|
||||||
$(eval $(call BuildPackage,olsrd-mod-secure))
|
$(eval $(call BuildPackage,olsrd-mod-secure))
|
||||||
|
$(eval $(call BuildPackage,olsrd-mod-tas))
|
||||||
$(eval $(call BuildPackage,olsrd-mod-txtinfo))
|
$(eval $(call BuildPackage,olsrd-mod-txtinfo))
|
||||||
$(eval $(call BuildPackage,olsrd-mod-watchdog))
|
$(eval $(call BuildPackage,olsrd-mod-watchdog))
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
--- a/src/linux/net.c
|
|
||||||
+++ b/src/linux/net.c
|
|
||||||
@@ -174,11 +174,13 @@ static bool is_at_least_linuxkernel_2_6_
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
net_os_set_global_ifoptions(void) {
|
|
||||||
+#if 0
|
|
||||||
if (writeToProc(olsr_cnf->ip_version == AF_INET ? PROC_IPFORWARD_V4 : PROC_IPFORWARD_V6, &orig_fwd_state, '1')) {
|
|
||||||
OLSR_PRINTF(1, "Warning, could not enable IP forwarding!\n"
|
|
||||||
"you should manually ensure that IP forwarding is enabled!\n\n");
|
|
||||||
olsr_startup_sleep(3);
|
|
||||||
}
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
if (olsr_cnf->smart_gw_active) {
|
|
||||||
char procfile[FILENAME_MAX];
|
|
||||||
@@ -273,10 +275,12 @@ net_os_restore_ifoptions(void)
|
|
||||||
|
|
||||||
OLSR_PRINTF(1, "Restoring network state\n");
|
|
||||||
|
|
||||||
+#if 0
|
|
||||||
/* Restore IP forwarding to "off" */
|
|
||||||
if (writeToProc(olsr_cnf->ip_version == AF_INET ? PROC_IPFORWARD_V4 : PROC_IPFORWARD_V6, NULL, orig_fwd_state)) {
|
|
||||||
OLSR_PRINTF(1, "Error, could not restore ip_forward settings\n");
|
|
||||||
}
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
if (olsr_cnf->smart_gw_active && (olsr_cnf->ip_version == AF_INET || olsr_cnf->use_niit)) {
|
|
||||||
/* Generate the procfile name */
|
|
@ -1,18 +0,0 @@
|
|||||||
diff --git a/lib/quagga/src/parse.c b/lib/quagga/src/parse.c
|
|
||||||
index 5220849..8672fab 100644
|
|
||||||
--- a/lib/quagga/src/parse.c
|
|
||||||
+++ b/lib/quagga/src/parse.c
|
|
||||||
@@ -103,11 +103,11 @@ static struct zroute
|
|
||||||
|
|
||||||
// Quagga v0.98.6 BUG workaround: metric is always sent by zebra
|
|
||||||
// even without ZAPI_MESSAGE_METRIC message.
|
|
||||||
-// if (r.message & ZAPI_MESSAGE_METRIC) {
|
|
||||||
+ if ((r->message & ZAPI_MESSAGE_METRIC) || !zebra.version) {
|
|
||||||
memcpy(&r->metric, pnt, sizeof r->metric);
|
|
||||||
r->metric = ntohl(r->metric);
|
|
||||||
pnt += sizeof r->metric;
|
|
||||||
-// }
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if (pnt - opt != length) {
|
|
||||||
olsr_exit("(QUAGGA) Length does not match!", EXIT_FAILURE);
|
|
@ -1,362 +0,0 @@
|
|||||||
--- a/lib/quagga/src/common.h
|
|
||||||
+++ b/lib/quagga/src/common.h
|
|
||||||
@@ -2,7 +2,7 @@
|
|
||||||
* OLSRd Quagga plugin
|
|
||||||
*
|
|
||||||
* Copyright (C) 2006-2008 Immo 'FaUl' Wehrenberg <immo@chaostreff-dortmund.de>
|
|
||||||
- * Copyright (C) 2007-2010 Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
|
|
||||||
+ * Copyright (C) 2007-2012 Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
@@ -21,7 +21,7 @@
|
|
||||||
|
|
||||||
/* Zebra route types */
|
|
||||||
#define ZEBRA_ROUTE_OLSR 11
|
|
||||||
-#define ZEBRA_ROUTE_MAX 13
|
|
||||||
+#define ZEBRA_ROUTE_MAX 14
|
|
||||||
|
|
||||||
struct zebra {
|
|
||||||
unsigned char status;
|
|
||||||
--- a/lib/quagga/src/packet.c
|
|
||||||
+++ b/lib/quagga/src/packet.c
|
|
||||||
@@ -2,7 +2,7 @@
|
|
||||||
* OLSRd Quagga plugin
|
|
||||||
*
|
|
||||||
* Copyright (C) 2006-2008 Immo 'FaUl' Wehrenberg <immo@chaostreff-dortmund.de>
|
|
||||||
- * Copyright (C) 2007-2010 Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
|
|
||||||
+ * Copyright (C) 2007-2012 Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
@@ -28,24 +28,43 @@ unsigned char
|
|
||||||
{
|
|
||||||
int count;
|
|
||||||
uint8_t len;
|
|
||||||
- uint16_t size;
|
|
||||||
+ uint16_t size, safi;
|
|
||||||
uint32_t ind, metric;
|
|
||||||
unsigned char *cmdopt, *t;
|
|
||||||
|
|
||||||
cmdopt = olsr_malloc(ZEBRA_MAX_PACKET_SIZ, "QUAGGA: New route packet");
|
|
||||||
|
|
||||||
t = &cmdopt[2];
|
|
||||||
- if (zebra.version) {
|
|
||||||
- *t++ = ZEBRA_HEADER_MARKER;
|
|
||||||
- *t++ = zebra.version;
|
|
||||||
- cmd = htons(cmd);
|
|
||||||
- memcpy(t, &cmd, sizeof cmd);
|
|
||||||
- t += sizeof cmd;
|
|
||||||
- } else
|
|
||||||
+ switch (zebra.version) {
|
|
||||||
+ case 0:
|
|
||||||
*t++ = (unsigned char) cmd;
|
|
||||||
+ break;
|
|
||||||
+ case 1:
|
|
||||||
+ case 2:
|
|
||||||
+ *t++ = ZEBRA_HEADER_MARKER;
|
|
||||||
+ *t++ = zebra.version;
|
|
||||||
+ cmd = htons(cmd);
|
|
||||||
+ memcpy(t, &cmd, sizeof cmd);
|
|
||||||
+ t += sizeof cmd;
|
|
||||||
+ break;
|
|
||||||
+ default:
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
*t++ = r->type;
|
|
||||||
*t++ = r->flags;
|
|
||||||
*t++ = r->message;
|
|
||||||
+ switch (zebra.version) {
|
|
||||||
+ case 0:
|
|
||||||
+ case 1:
|
|
||||||
+ break;
|
|
||||||
+ case 2:
|
|
||||||
+ safi = htons(r->safi);
|
|
||||||
+ memcpy(t, &safi, sizeof safi);
|
|
||||||
+ t += sizeof safi;
|
|
||||||
+ break;
|
|
||||||
+ default:
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
*t++ = r->prefixlen;
|
|
||||||
len = (r->prefixlen + 7) / 8;
|
|
||||||
if (olsr_cnf->ip_version == AF_INET)
|
|
||||||
@@ -97,14 +116,21 @@ unsigned char
|
|
||||||
data = olsr_malloc(ZEBRA_MAX_PACKET_SIZ , "QUAGGA: New redistribute packet");
|
|
||||||
|
|
||||||
pnt = &data[2];
|
|
||||||
- if (zebra.version) {
|
|
||||||
- *pnt++ = ZEBRA_HEADER_MARKER;
|
|
||||||
- *pnt++ = zebra.version;
|
|
||||||
- cmd = htons(cmd);
|
|
||||||
- memcpy(pnt, &cmd, sizeof cmd);
|
|
||||||
- pnt += sizeof cmd;
|
|
||||||
- } else
|
|
||||||
+ switch (zebra.version) {
|
|
||||||
+ case 0:
|
|
||||||
*pnt++ = (unsigned char) cmd;
|
|
||||||
+ break;
|
|
||||||
+ case 1:
|
|
||||||
+ case 2:
|
|
||||||
+ *pnt++ = ZEBRA_HEADER_MARKER;
|
|
||||||
+ *pnt++ = zebra.version;
|
|
||||||
+ cmd = htons(cmd);
|
|
||||||
+ memcpy(pnt, &cmd, sizeof cmd);
|
|
||||||
+ pnt += sizeof cmd;
|
|
||||||
+ break;
|
|
||||||
+ default:
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
*pnt++ = type;
|
|
||||||
size = htons(pnt - data);
|
|
||||||
memcpy(data, &size, sizeof size);
|
|
||||||
--- a/lib/quagga/src/packet.h
|
|
||||||
+++ b/lib/quagga/src/packet.h
|
|
||||||
@@ -2,7 +2,7 @@
|
|
||||||
* OLSRd Quagga plugin
|
|
||||||
*
|
|
||||||
* Copyright (C) 2006-2008 Immo 'FaUl' Wehrenberg <immo@chaostreff-dortmund.de>
|
|
||||||
- * Copyright (C) 2007-2010 Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
|
|
||||||
+ * Copyright (C) 2007-2012 Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
@@ -32,6 +32,7 @@
|
|
||||||
#define ZEBRA_IPV6_ROUTE_DELETE 10
|
|
||||||
#define ZEBRA_REDISTRIBUTE_ADD 11
|
|
||||||
#define ZEBRA_REDISTRIBUTE_DELETE 12
|
|
||||||
+#define ZEBRA_HELLO 23
|
|
||||||
|
|
||||||
/* Zebra nexthop flags */
|
|
||||||
#define ZEBRA_NEXTHOP_IFINDEX 1
|
|
||||||
@@ -44,6 +45,9 @@
|
|
||||||
#define ZAPI_MESSAGE_DISTANCE 0x04
|
|
||||||
#define ZAPI_MESSAGE_METRIC 0x08
|
|
||||||
|
|
||||||
+/* Subsequent Address Family Identifier */
|
|
||||||
+#define SAFI_UNICAST 1
|
|
||||||
+
|
|
||||||
/* Zebra flags */
|
|
||||||
#define ZEBRA_FLAG_SELECTED 0x10
|
|
||||||
|
|
||||||
@@ -51,6 +55,7 @@ struct zroute {
|
|
||||||
unsigned char type;
|
|
||||||
unsigned char flags;
|
|
||||||
unsigned char message;
|
|
||||||
+ uint16_t safi;
|
|
||||||
unsigned char prefixlen;
|
|
||||||
union olsr_ip_addr prefix;
|
|
||||||
unsigned char nexthop_num;
|
|
||||||
--- a/lib/quagga/src/parse.c
|
|
||||||
+++ b/lib/quagga/src/parse.c
|
|
||||||
@@ -2,7 +2,7 @@
|
|
||||||
* OLSRd Quagga plugin
|
|
||||||
*
|
|
||||||
* Copyright (C) 2006-2008 Immo 'FaUl' Wehrenberg <immo@chaostreff-dortmund.de>
|
|
||||||
- * Copyright (C) 2007-2010 Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
|
|
||||||
+ * Copyright (C) 2007-2012 Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
@@ -52,7 +52,17 @@ static struct zroute
|
|
||||||
length = ntohs (length);
|
|
||||||
|
|
||||||
r = olsr_malloc(sizeof *r, "QUAGGA: New zebra route");
|
|
||||||
- pnt = (zebra.version ? &opt[6] : &opt[3]);
|
|
||||||
+ switch (zebra.version) {
|
|
||||||
+ case 0:
|
|
||||||
+ pnt = &opt[3];
|
|
||||||
+ break;
|
|
||||||
+ case 1:
|
|
||||||
+ case 2:
|
|
||||||
+ pnt = &opt[6];
|
|
||||||
+ break;
|
|
||||||
+ default:
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
r->type = *pnt++;
|
|
||||||
r->flags = *pnt++;
|
|
||||||
r->message = *pnt++;
|
|
||||||
@@ -68,6 +78,7 @@ static struct zroute
|
|
||||||
switch (zebra.version) {
|
|
||||||
case 0:
|
|
||||||
case 1:
|
|
||||||
+ case 2:
|
|
||||||
if (r->message & ZAPI_MESSAGE_NEXTHOP) {
|
|
||||||
r->nexthop_num = *pnt++;
|
|
||||||
r->nexthop = olsr_malloc((sizeof *r->nexthop) * r->nexthop_num, "QUAGGA: New zebra route nexthop");
|
|
||||||
@@ -137,13 +148,20 @@ zparse(void *foo __attribute__ ((unused)
|
|
||||||
length = ntohs (length);
|
|
||||||
if (!length) // something weired happened
|
|
||||||
olsr_exit("(QUAGGA) Zero message length!", EXIT_FAILURE);
|
|
||||||
- if (zebra.version) {
|
|
||||||
- if ((f[2] != ZEBRA_HEADER_MARKER) || (f[3] != zebra.version))
|
|
||||||
- olsr_exit("(QUAGGA) Invalid zebra header received!", EXIT_FAILURE);
|
|
||||||
- memcpy(&command, &f[4], sizeof command);
|
|
||||||
- command = ntohs (command);
|
|
||||||
- } else
|
|
||||||
+ switch (zebra.version) {
|
|
||||||
+ case 0:
|
|
||||||
command = f[2];
|
|
||||||
+ break;
|
|
||||||
+ case 1:
|
|
||||||
+ case 2:
|
|
||||||
+ if ((f[2] != ZEBRA_HEADER_MARKER) || (f[3] != zebra.version))
|
|
||||||
+ olsr_exit("(QUAGGA) Invalid zebra header received!", EXIT_FAILURE);
|
|
||||||
+ memcpy(&command, &f[4], sizeof command);
|
|
||||||
+ command = ntohs (command);
|
|
||||||
+ break;
|
|
||||||
+ default:
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
if (olsr_cnf->ip_version == AF_INET) {
|
|
||||||
switch (command) {
|
|
||||||
case ZEBRA_IPV4_ROUTE_ADD:
|
|
||||||
--- a/lib/quagga/src/plugin.c
|
|
||||||
+++ b/lib/quagga/src/plugin.c
|
|
||||||
@@ -2,7 +2,7 @@
|
|
||||||
* OLSRd Quagga plugin
|
|
||||||
*
|
|
||||||
* Copyright (C) 2006-2008 Immo 'FaUl' Wehrenberg <immo@chaostreff-dortmund.de>
|
|
||||||
- * Copyright (C) 2007-2010 Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
|
|
||||||
+ * Copyright (C) 2007-2012 Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
@@ -50,7 +50,7 @@ zplugin_redistribute(const char *value,
|
|
||||||
{
|
|
||||||
const char *zroute_types[] = { "system", "kernel", "connect",
|
|
||||||
"static", "rip", "ripng", "ospf", "ospf6", "isis", "bgp",
|
|
||||||
- "hsls", "olsr", "batman"
|
|
||||||
+ "hsls", "olsr", "batman", "babel"
|
|
||||||
};
|
|
||||||
unsigned int i;
|
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ zplugin_version(const char *value, void
|
|
||||||
|
|
||||||
if (set_plugin_int(value, &version, addon))
|
|
||||||
return 1;
|
|
||||||
- if (version < 0 || version > 1)
|
|
||||||
+ if (version < 0 || version > 2)
|
|
||||||
return 1;
|
|
||||||
zebra.version = version;
|
|
||||||
|
|
||||||
--- a/lib/quagga/src/quagga.c
|
|
||||||
+++ b/lib/quagga/src/quagga.c
|
|
||||||
@@ -2,7 +2,7 @@
|
|
||||||
* OLSRd Quagga plugin
|
|
||||||
*
|
|
||||||
* Copyright (C) 2006-2008 Immo 'FaUl' Wehrenberg <immo@chaostreff-dortmund.de>
|
|
||||||
- * Copyright (C) 2007-2011 Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
|
|
||||||
+ * Copyright (C) 2007-2012 Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
@@ -63,6 +63,7 @@ zebra_addroute(const struct rt_entry *r)
|
|
||||||
route.type = ZEBRA_ROUTE_OLSR;
|
|
||||||
route.flags = zebra.flags;
|
|
||||||
route.message = ZAPI_MESSAGE_NEXTHOP | ZAPI_MESSAGE_METRIC;
|
|
||||||
+ route.safi = SAFI_UNICAST;
|
|
||||||
route.prefixlen = r->rt_dst.prefix_len;
|
|
||||||
if (olsr_cnf->ip_version == AF_INET)
|
|
||||||
route.prefix.v4.s_addr = r->rt_dst.prefix.v4.s_addr;
|
|
||||||
@@ -112,6 +113,7 @@ zebra_delroute(const struct rt_entry *r)
|
|
||||||
route.type = ZEBRA_ROUTE_OLSR;
|
|
||||||
route.flags = zebra.flags;
|
|
||||||
route.message = ZAPI_MESSAGE_NEXTHOP | ZAPI_MESSAGE_METRIC;
|
|
||||||
+ route.safi = SAFI_UNICAST;
|
|
||||||
route.prefixlen = r->rt_dst.prefix_len;
|
|
||||||
if (olsr_cnf->ip_version == AF_INET)
|
|
||||||
route.prefix.v4.s_addr = r->rt_dst.prefix.v4.s_addr;
|
|
||||||
@@ -164,6 +166,15 @@ zebra_redistribute(uint16_t cmd)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
+void
|
|
||||||
+zebra_hello(uint16_t cmd)
|
|
||||||
+{
|
|
||||||
+
|
|
||||||
+ if (zclient_write(zpacket_redistribute(cmd, ZEBRA_ROUTE_OLSR)) < 0)
|
|
||||||
+ olsr_exit("(QUAGGA) Could not write hello packet!", EXIT_FAILURE);
|
|
||||||
+
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* Local Variables:
|
|
||||||
* c-basic-offset: 2
|
|
||||||
--- a/lib/quagga/src/client.c
|
|
||||||
+++ b/lib/quagga/src/client.c
|
|
||||||
@@ -2,7 +2,7 @@
|
|
||||||
* OLSRd Quagga plugin
|
|
||||||
*
|
|
||||||
* Copyright (C) 2006-2008 Immo 'FaUl' Wehrenberg <immo@chaostreff-dortmund.de>
|
|
||||||
- * Copyright (C) 2007-2010 Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
|
|
||||||
+ * Copyright (C) 2007-2012 Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
@@ -95,6 +95,7 @@ zclient_reconnect(void)
|
|
||||||
if (!(zebra.status & STATUS_CONNECTED))
|
|
||||||
return; // try again next time
|
|
||||||
|
|
||||||
+ zebra_hello(ZEBRA_HELLO);
|
|
||||||
if (zebra.options & OPTION_EXPORT) {
|
|
||||||
OLSR_FOR_ALL_RT_ENTRIES(tmp) {
|
|
||||||
zebra_addroute(tmp);
|
|
||||||
--- a/lib/quagga/README_QUAGGA
|
|
||||||
+++ b/lib/quagga/README_QUAGGA
|
|
||||||
@@ -11,9 +11,9 @@ It allows olsrd to redistribute from var
|
|
||||||
as well as to export olsr-routes to quagga so that they can be
|
|
||||||
redistributed by the quagga-routing-daemons.
|
|
||||||
|
|
||||||
-You also need a source distribution of quagga-0.98.6 or quagga-0.99.15.
|
|
||||||
+You also need a source distribution of quagga-0.98.6 or quagga-0.99.21.
|
|
||||||
The quagga source tree needs to be patched with quagga-0.98.6.diff or
|
|
||||||
-quagga-0.99.15.diff, respectively, compiled and installed via
|
|
||||||
+quagga-0.99.21.diff, respectively, compiled and installed via
|
|
||||||
'make install'.
|
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
@@ -48,7 +48,10 @@ PlParam "Port" "<port>"
|
|
||||||
|
|
||||||
PlParam "Version" "<version>"
|
|
||||||
sets the version of packet format to communicate with zebra.
|
|
||||||
- use "0" for Quagga 0.98.x and "1" for Quagga 0.99.x.
|
|
||||||
+ use:
|
|
||||||
+ "0" for Quagga 0.98.x
|
|
||||||
+ "1" for Quagga 0.99.17 up to 0.99.20.1
|
|
||||||
+ "2" for Quagga 0.99.21 and above
|
|
||||||
defaults to "0".
|
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
@@ -65,9 +68,9 @@ LoadPlugin "olsrd_quagga.so.0.2.2"
|
|
||||||
PlParam "Distance" "125"
|
|
||||||
PlParam "LocalPref" "false"
|
|
||||||
PlParam "SockPath" "/var/run/zserv.api"
|
|
||||||
- PlParam "Version" "1"
|
|
||||||
+ PlParam "Version" "2"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
-EOF / 10.03.2010
|
|
||||||
+EOF / 31.05.2012
|
|
||||||
--- a/lib/quagga/src/quagga.h
|
|
||||||
+++ b/lib/quagga/src/quagga.h
|
|
||||||
@@ -2,7 +2,7 @@
|
|
||||||
* OLSRd Quagga plugin
|
|
||||||
*
|
|
||||||
* Copyright (C) 2006-2008 Immo 'FaUl' Wehrenberg <immo@chaostreff-dortmund.de>
|
|
||||||
- * Copyright (C) 2007-2010 Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
|
|
||||||
+ * Copyright (C) 2007-2012 Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
@@ -31,6 +31,7 @@ void zebra_fini(void);
|
|
||||||
int zebra_addroute(const struct rt_entry *);
|
|
||||||
int zebra_delroute(const struct rt_entry *);
|
|
||||||
void zebra_redistribute(uint16_t cmd);
|
|
||||||
+void zebra_hello(uint16_t cmd);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Local Variables:
|
|
Loading…
x
Reference in New Issue
Block a user