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>
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)))
{