summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-02-07 18:34:38 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-02-08 09:46:43 -0500
commit6431763d950ddebef060e1519b201709dc45570e (patch)
treea00588c5a45b2f53bcdc9b1d3adf1120ce211ef4
parente84aba82ab3ab5192eecaa4a210bf1fcf7aaceda (diff)
pimd: Send proper length register packets
PIM Register packets are 20 bytes too long. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
-rw-r--r--pimd/pim_mroute.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c
index bd9a1c4605..b1cdaf9b95 100644
--- a/pimd/pim_mroute.c
+++ b/pimd/pim_mroute.c
@@ -236,8 +236,9 @@ pim_mroute_msg_wholepkt (int fd, struct interface *ifp, const char *buf)
* If we've received a register suppress
*/
if (!up->t_rs_timer)
- pim_register_send((uint8_t *)buf + sizeof(struct ip), ntohs (ip_hdr->ip_len),
- pim_ifp->primary_address, rpg, 0, up);
+ pim_register_send((uint8_t *)buf + sizeof(struct ip),
+ ntohs (ip_hdr->ip_len) - sizeof (struct ip),
+ pim_ifp->primary_address, rpg, 0, up);
return 0;
}