forked from pool/atftp
20 lines
698 B
Diff
20 lines
698 B
Diff
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;
|
|
}
|
|
}
|