summaryrefslogtreecommitdiff
path: root/pimd/pim_pim.c
diff options
context:
space:
mode:
Diffstat (limited to 'pimd/pim_pim.c')
-rw-r--r--pimd/pim_pim.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/pimd/pim_pim.c b/pimd/pim_pim.c
index 3980e4828d..616cad16c6 100644
--- a/pimd/pim_pim.c
+++ b/pimd/pim_pim.c
@@ -523,7 +523,8 @@ static uint16_t ip_id = 0;
static int pim_msg_send_frame(int fd, char *buf, size_t len,
- struct sockaddr *dst, size_t salen)
+ struct sockaddr *dst, size_t salen,
+ const char *ifname)
{
struct ip *ip = (struct ip *)buf;
@@ -539,8 +540,8 @@ static int pim_msg_send_frame(int fd, char *buf, size_t len,
ip->ip_len = htons(sendlen);
ip->ip_off = htons(offset | IP_MF);
- if (pim_msg_send_frame(fd, buf, sendlen, dst, salen)
- == 0) {
+ if (pim_msg_send_frame(fd, buf, sendlen, dst, salen,
+ ifname) == 0) {
struct ip *ip2 = (struct ip *)(buf + newlen1);
size_t newlen2 = len - sendlen;
sendlen = newlen2 + hdrsize;
@@ -549,7 +550,8 @@ static int pim_msg_send_frame(int fd, char *buf, size_t len,
ip2->ip_len = htons(sendlen);
ip2->ip_off = htons(offset + (newlen1 >> 3));
return pim_msg_send_frame(fd, (char *)ip2,
- sendlen, dst, salen);
+ sendlen, dst, salen,
+ ifname);
}
}
@@ -559,9 +561,9 @@ static int pim_msg_send_frame(int fd, char *buf, size_t len,
pim_inet4_dump("<dst?>", ip->ip_dst, dst_str,
sizeof(dst_str));
zlog_warn(
- "%s: sendto() failure to %s: fd=%d msg_size=%zd: errno=%d: %s",
- __func__, dst_str, fd, len, errno,
- safe_strerror(errno));
+ "%s: sendto() failure to %s: iface=%s fd=%d msg_size=%zd: errno=%d: %s",
+ __func__, dst_str, ifname, fd, len,
+ errno, safe_strerror(errno));
}
return -1;
}
@@ -643,7 +645,7 @@ int pim_msg_send(int fd, pim_addr src, pim_addr dst, uint8_t *pim_msg,
}
pim_msg_send_frame(fd, (char *)buffer, sendlen, (struct sockaddr *)&to,
- tolen);
+ tolen, ifname);
return 0;
}