From f8e7d7992fe201052e3969bdd4aab217ffd4d505 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 10 Feb 2017 13:46:52 -0500 Subject: 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 --- pimd/pim_pim.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pimd/pim_pim.c') 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, -- cgit v1.2.3