diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-02-10 19:46:52 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-02-24 16:03:40 +0100 |
commit | f8e7d7992fe201052e3969bdd4aab217ffd4d505 (patch) | |
tree | 897aa1fd39414d2dc7f9a73b0b8a3c21060df5a4 /pimd/pim_pim.c | |
parent | pimd: Add 'struct pim_msg_header' packed data structure. (diff) | |
download | frr-f8e7d7992fe201052e3969bdd4aab217ffd4d505.tar.xz frr-f8e7d7992fe201052e3969bdd4aab217ffd4d505.zip |
pimd: Assume buffer size passed in is of sufficient size
For:
pim_msg_build_header
pim_msg_addr_encode_ipv4_ucast
pim_msg_addr_encode_ipv4_group
pim_msg_addr_encode_ipv4_source
Assume that the buffer size passed in is of sufficient size
already. This is assured already because buffer sizes
are checked for minimum lengths for the entire packet
ahead of time. So we are double checking.
Additionally at scale we will be calling these functions
a very very large number of times.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_pim.c')
-rw-r--r-- | pimd/pim_pim.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pimd/pim_pim.c b/pimd/pim_pim.c index dd0071d41..b81b1b01a 100644 --- a/pimd/pim_pim.c +++ b/pimd/pim_pim.c @@ -669,8 +669,7 @@ static int hello_send(struct interface *ifp, zassert(pim_msg_size >= PIM_PIM_MIN_LEN); zassert(pim_msg_size <= PIM_PIM_BUFSIZE_WRITE); - pim_msg_build_header(pim_msg, pim_msg_size, - PIM_MSG_TYPE_HELLO); + pim_msg_build_header(pim_msg, pim_msg_size, PIM_MSG_TYPE_HELLO); if (pim_msg_send(pim_ifp->pim_sock_fd, pim_ifp->primary_address, |