]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Fix last sent command to protocol
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 3 Jun 2016 08:56:10 +0000 (04:56 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 3 Jun 2016 08:59:26 +0000 (04:59 -0400)
With the addition of VRF's we were not properly
storing the last sent command to individual
protocols from zebra.  This commit fixes this:

Pre-Fix:
Client: bgp
------------------------
FD: 14
Route Table ID: 0
Connect Time: 00:10:51
Not registered for Nexthop Updates
Last Msg Rx Time: 00:10:51
Last Msg Tx Time: 00:00:04
Last Rcvd Cmd: ZEBRA_REDISTRIBUTE_ADD
Last Sent Cmd: (null)

Post-Fix:
Client: bgp
------------------------
FD: 14
Route Table ID: 0
Connect Time: 00:02:42
Not registered for Nexthop Updates
Last Msg Rx Time: 00:02:42
Last Msg Tx Time: 00:00:09
Last Rcvd Cmd: ZEBRA_REDISTRIBUTE_ADD
Last Sent Cmd: ZEBRA_INTERFACE_UP

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/zserv.c

index 8bc90130be4d7394fd36d26de8b6b2f659fa7943..6e4f9bbe7d9e43291e29311a15d641aa4f9942fe 100644 (file)
@@ -108,7 +108,7 @@ zebra_server_send_message(struct zserv *client)
     return -1;
 
   stream_set_getp(client->obuf, 0);
-  client->last_write_cmd = stream_getw_from(client->obuf, 4);
+  client->last_write_cmd = stream_getw_from(client->obuf, 6);
   switch (buffer_write(client->wb, client->sock, STREAM_DATA(client->obuf),
                       stream_get_endp(client->obuf)))
     {