commit edc9bcd0c79006e05a1aca0fbfb43d36fc8c6a19
parent ef5b4d8a7df74cb33cd1480a5ec2ee077897ab4e
Author: Yersa Nordman <yersa@finwo.nl>
Date: Fri, 13 Oct 2023 22:48:06 +0200
Added clarification on which sendto has issues
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/main.c b/src/main.c
@@ -48,6 +48,7 @@ void handle_packet_bond(struct pmlag_bond *bond) {
for( i = 0 ; i < bond->iface_count ; i++ ) {
if (sendto(bond->iface[i]->sockfd, rcvbuf, buflen, 0, NULL, 0) != buflen) {
perror("sendto");
+ printf("Error during sendto on %d\n", __LINE__);
}
}
return;
@@ -56,6 +57,7 @@ void handle_packet_bond(struct pmlag_bond *bond) {
// Forward packet to iface as-is
if (sendto(iface->sockfd, rcvbuf, buflen, 0, NULL, 0) != buflen) {
perror("sendto");
+ printf("Error during sendto on %d\n", __LINE__);
}
}
@@ -339,6 +341,7 @@ int main(int argc, const char **argv) {
saddr_ll.sll_ifindex = iface->ifidx;
if (sendto(iface->sockfd, anc_buffer, anc_buflen, 0, (const struct sockaddr*)&saddr_ll, sizeof(struct sockaddr_ll)) != anc_buflen) {
perror("sendto");
+ printf("Error during sendto on %d\n", __LINE__);
}
}