[quagga-dev 13021] [PATCH] bgpd: fix zAPI parsing

Nicolas Dichtel nicolas.dichtel at 6wind.com
Fri Sep 4 16:40:53 BST 2015


Commit c99f3481a598 has changed the API. Now, the vrfid has been added in
the header, thus we must read it before parsing the rest of the message.

Fixes: c99f3481a598 ("*: add VRF ID in the API message header")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel at 6wind.com>
---

Martin, could you test this patch? At least it fixes the ebgp multihop bug.
I will check if some other places need this.

 bgpd/bgp_nexthop.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c
index 7336793e01e6..8043a3e27419 100644
--- a/bgpd/bgp_nexthop.c
+++ b/bgpd/bgp_nexthop.c
@@ -808,6 +808,8 @@ zlookup_read (void)
   nbytes = stream_read (s, zlookup->sock, length - 2);
   marker = stream_getc (s);
   version = stream_getc (s);
+  /* Skip vrfid */
+  stream_forward_getp(s, 2);
   
   if (version != ZSERV_VERSION || marker != ZEBRA_HEADER_MARKER)
     {
-- 
2.4.2





More information about the Quagga-dev mailing list