SHA256
1
0
forked from pool/atftp
atftp/atftp-0.7_sol_ip.patch

20 lines
698 B
Diff
Raw Normal View History

Index: tftp_io.c
===================================================================
--- tftp_io.c.orig
+++ tftp_io.c
@@ -284,12 +284,14 @@ int tftp_get_packet(int sock1, int sock2
cmsg != NULL && cmsg->cmsg_len >= sizeof(*cmsg);
cmsg = CMSG_NXTHDR(&msg, cmsg))
{
+#ifdef SOL_IP
if (cmsg->cmsg_level == SOL_IP
&& cmsg->cmsg_type == IP_PKTINFO)
{
pktinfo = (struct in_pktinfo *)CMSG_DATA(cmsg);
sa_to->sin_addr = pktinfo->ipi_addr;
}
+#endif
break;
}
}