[tftp] fixes #739534 - TFTP to an IP alias of FC15 tftp server failed
Jiri Skala
jskala at fedoraproject.org
Wed Jan 4 09:45:24 UTC 2012
commit 083423c33bea8c083cc6952183fd732d59fd1e3c
Author: Jiri Skala <jskala at redhat.com>
Date: Wed Jan 4 10:45:15 2012 +0100
fixes #739534 - TFTP to an IP alias of FC15 tftp server failed
tftp-hpa-5.2-pktinfo.patch | 23 +++++++++++++++++++++++
tftp.spec | 7 ++++++-
2 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/tftp-hpa-5.2-pktinfo.patch b/tftp-hpa-5.2-pktinfo.patch
new file mode 100644
index 0000000..d1fa75c
--- /dev/null
+++ b/tftp-hpa-5.2-pktinfo.patch
@@ -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
diff --git a/tftp.spec b/tftp.spec
index af2275d..6c0d0d1 100644
--- a/tftp.spec
+++ b/tftp.spec
@@ -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 at redhat.com> - 5.2-2
+- fixes #739534 - TFTP to an IP alias of FC15 tftp server failed
+
* Wed Dec 14 2011 Jiri Skala <jskala at redhat.com> - 5.2-1
- updated to latest upstream - 5.2
More information about the scm-commits
mailing list