summaryrefslogtreecommitdiffstats
path: root/pimd/pim_zlookup.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-05-26 18:41:55 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-05-27 01:21:20 +0200
commit762e563e522af9f5bfd843460c9940c1afae7061 (patch)
tree31c875c0ca4ce37a0dd7e125461765c127801200 /pimd/pim_zlookup.c
parentdebian: Add test_igmpv3_join to packaging (diff)
downloadfrr-762e563e522af9f5bfd843460c9940c1afae7061.tar.xz
frr-762e563e522af9f5bfd843460c9940c1afae7061.zip
pimd: Double read of stream
The addition of the zclient_read_header call reads the entirety of the stream for you and makes sure it's consistent with the header. When the function call was added it read the stream data in zclient_read_header and then reread the data after that. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to '')
-rw-r--r--pimd/pim_zlookup.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c
index 9b572963a..0ca3da20a 100644
--- a/pimd/pim_zlookup.c
+++ b/pimd/pim_zlookup.c
@@ -155,7 +155,6 @@ static int zclient_read_nexthop(struct zclient *zlookup,
u_char version;
uint16_t vrf_id;
uint16_t command;
- int nbytes;
struct in_addr raddr;
uint8_t distance;
uint32_t metric;
@@ -189,14 +188,6 @@ static int zclient_read_nexthop(struct zclient *zlookup,
return -2;
}
- nbytes = stream_read(s, zlookup->sock, length);
- if (nbytes < length) {
- zlog_err("%s %s: failure reading zclient lookup socket: nbytes=%d < len=%d",
- __FILE__, __PRETTY_FUNCTION__, nbytes, length);
- zclient_lookup_failed(zlookup);
- return -3;
- }
-
if (version != ZSERV_VERSION || marker != ZEBRA_HEADER_MARKER) {
zlog_err("%s: socket %d version mismatch, marker %d, version %d",
__func__, zlookup->sock, marker, version);