Blame SOURCES/tftp-hpa-5.2-pktinfo.patch
|
|
364356 |
diff -up tftp-hpa-5.2/tftpd/recvfrom.c.test tftp-hpa-5.2/tftpd/recvfrom.c
|
|
|
364356 |
--- tftp-hpa-5.2/tftpd/recvfrom.c.test 2011-12-11 23:13:52.000000000 +0100
|
|
|
364356 |
+++ tftp-hpa-5.2/tftpd/recvfrom.c 2012-01-04 10:05:17.852042256 +0100
|
|
|
364356 |
@@ -149,16 +149,16 @@ myrecvfrom(int s, void *buf, int len, un
|
|
|
364356 |
|
|
|
364356 |
/* Try to enable getting the return address */
|
|
|
364356 |
#ifdef IP_RECVDSTADDR
|
|
|
364356 |
- if (from->sa_family == AF_INET)
|
|
|
364356 |
+ if (from->sa_family == AF_INET || !from->sa_family)
|
|
|
364356 |
setsockopt(s, IPPROTO_IP, IP_RECVDSTADDR, &on, sizeof(on));
|
|
|
364356 |
#endif
|
|
|
364356 |
#ifdef IP_PKTINFO
|
|
|
364356 |
- if (from->sa_family == AF_INET)
|
|
|
364356 |
+ if (from->sa_family == AF_INET || !from->sa_family)
|
|
|
364356 |
setsockopt(s, IPPROTO_IP, IP_PKTINFO, &on, sizeof(on));
|
|
|
364356 |
#endif
|
|
|
364356 |
#ifdef HAVE_IPV6
|
|
|
364356 |
#ifdef IPV6_RECVPKTINFO
|
|
|
364356 |
- if (from->sa_family == AF_INET6)
|
|
|
364356 |
+ if (from->sa_family == AF_INET6 || !from->sa_family)
|
|
|
364356 |
setsockopt(s, IPPROTO_IPV6, IPV6_RECVPKTINFO, &on, sizeof(on));
|
|
|
364356 |
#endif
|
|
|
364356 |
#endif
|