diff options
| author | mobash-rasool <mobash.rasool@gmail.com> | 2022-05-11 10:04:18 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-11 10:04:18 +0530 |
| commit | daa97042a2720ed46a1c1817d58cd7a9d08b333e (patch) | |
| tree | 0fc037e522f4920dfa2be5697a1a195a0358543c /pimd/pim_mroute.c | |
| parent | 00358e444ee893778f7f21b189c65ed4de263d15 (diff) | |
| parent | 993e3d8e131ab729f86bfd01f031093dc4827d87 (diff) | |
Merge pull request #11151 from opensourcerouting/pim-various-20220506
pimd, pim6d: fix various smaller issues
Diffstat (limited to 'pimd/pim_mroute.c')
| -rw-r--r-- | pimd/pim_mroute.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c index 5f951b4dfc..1978afa7c0 100644 --- a/pimd/pim_mroute.c +++ b/pimd/pim_mroute.c @@ -137,7 +137,8 @@ int pim_mroute_msg_nocache(int fd, struct interface *ifp, const kernmsg *msg) return 0; } -int pim_mroute_msg_wholepkt(int fd, struct interface *ifp, const char *buf) +int pim_mroute_msg_wholepkt(int fd, struct interface *ifp, const char *buf, + size_t len) { struct pim_interface *pim_ifp; pim_sgaddr sg; @@ -229,7 +230,7 @@ int pim_mroute_msg_wholepkt(int fd, struct interface *ifp, const char *buf) } pim_register_send((uint8_t *)buf + sizeof(ipv_hdr), - ntohs(IPV_LEN(ip_hdr)) - sizeof(ipv_hdr), + len - sizeof(ipv_hdr), pim_ifp->primary_address, rpg, 0, up); } return 0; @@ -336,7 +337,8 @@ int pim_mroute_msg_wrongvif(int fd, struct interface *ifp, const kernmsg *msg) return 0; } -int pim_mroute_msg_wrvifwhole(int fd, struct interface *ifp, const char *buf) +int pim_mroute_msg_wrvifwhole(int fd, struct interface *ifp, const char *buf, + size_t len) { const ipv_hdr *ip_hdr = (const ipv_hdr *)buf; struct pim_interface *pim_ifp; @@ -463,7 +465,7 @@ int pim_mroute_msg_wrvifwhole(int fd, struct interface *ifp, const char *buf) pim_upstream_keep_alive_timer_start( up, pim_ifp->pim->keep_alive_time); pim_upstream_inherited_olist(pim_ifp->pim, up); - pim_mroute_msg_wholepkt(fd, ifp, buf); + pim_mroute_msg_wholepkt(fd, ifp, buf, len); } return 0; } @@ -490,7 +492,7 @@ int pim_mroute_msg_wrvifwhole(int fd, struct interface *ifp, const char *buf) pim_upstream_mroute_add(up->channel_oil, __func__); // Send the packet to the RP - pim_mroute_msg_wholepkt(fd, ifp, buf); + pim_mroute_msg_wholepkt(fd, ifp, buf, len); } else { up = pim_upstream_add(pim_ifp->pim, &sg, ifp, PIM_UPSTREAM_FLAG_MASK_SRC_NOCACHE, |
