[packages] olsrd: Fix quagga plugin metric parsing
authorVasilis Tsiligiannis <acinonyx@openwrt.gr>
Mon, 16 Apr 2012 19:15:24 +0000 (19:15 +0000)
committerVasilis Tsiligiannis <acinonyx@openwrt.gr>
Mon, 16 Apr 2012 19:15:24 +0000 (19:15 +0000)
SVN-Revision: 31319

net/olsrd/patches/110-fix_metric_parsing.patch [new file with mode: 0644]

diff --git a/net/olsrd/patches/110-fix_metric_parsing.patch b/net/olsrd/patches/110-fix_metric_parsing.patch
new file mode 100644 (file)
index 0000000..2b0d531
--- /dev/null
@@ -0,0 +1,18 @@
+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);