fixes #739534 - TFTP to an IP alias of FC15 tftp server failed

This commit is contained in:
Jiri Skala 2012-01-04 10:45:15 +01:00
parent c707bc6f87
commit 083423c33b
2 changed files with 29 additions and 1 deletions

View File

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

View File

@ -1,7 +1,7 @@
Summary: The client for the Trivial File Transfer Protocol (TFTP)
Name: tftp
Version: 5.2
Release: 1%{?dist}
Release: 2%{?dist}
License: BSD
Group: Applications/Internet
Source0: http://www.kernel.org/pub/software/network/tftp/tftp-hpa-%{version}.tar.bz2
@ -14,6 +14,7 @@ Patch4: tftp-0.49-chk_retcodes.patch
Patch5: tftp-hpa-0.49-fortify-strcpy-crash.patch
Patch6: tftp-0.49-cmd_arg.patch
Patch7: tftp-hpa-0.49-stats.patch
Patch8: tftp-hpa-5.2-pktinfo.patch
BuildRequires: tcp_wrappers-devel readline-devel autoconf
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -49,6 +50,7 @@ enabled unless it is expressly needed. The TFTP server is run from
%patch5 -p1 -b .fortify-strcpy-crash
%patch6 -p1 -b .cmd_arg
%patch7 -p1 -b .stats
%patch8 -p1 -b .pktinfo
%build
autoreconf
@ -94,6 +96,9 @@ rm -rf ${RPM_BUILD_ROOT}
%{_mandir}/man8/*
%changelog
* Wed Jan 04 2012 Jiri Skala <jskala@redhat.com> - 5.2-2
- fixes #739534 - TFTP to an IP alias of FC15 tftp server failed
* Wed Dec 14 2011 Jiri Skala <jskala@redhat.com> - 5.2-1
- updated to latest upstream - 5.2