commit tftp for openSUSE:Factory
Hello community, here is the log from the commit of package tftp for openSUSE:Factory checked in at 2012-09-06 09:06:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/tftp (Old) and /work/SRC/openSUSE:Factory/.tftp.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "tftp", Maintainer is "VCizek@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/tftp/tftp.changes 2011-12-26 16:29:42.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.tftp.new/tftp.changes 2012-09-06 09:06:51.000000000 +0200 @@ -1,0 +2,7 @@ +Tue Sep 4 13:09:09 UTC 2012 - vcizek@suse.com + +- update to 5.2 + - fixes a breakage with recent Linux kernel versions when a + single interface has multiple IP addresses (bnc#774861) + +------------------------------------------------------------------- Old: ---- tftp-hpa-5.1.tar.bz2 New: ---- tftp-hpa-5.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ tftp.spec ++++++ --- /var/tmp/diff_new_pack.6TPHtQ/_old 2012-09-06 09:06:52.000000000 +0200 +++ /var/tmp/diff_new_pack.6TPHtQ/_new 2012-09-06 09:06:52.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package tftp # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,10 +15,11 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + %define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services Name: tftp -Version: 5.1 +Version: 5.2 Release: 0 Summary: Trivial File Transfer Protocol (TFTP) License: BSD-3-Clause ++++++ tftp-hpa-5.1.tar.bz2 -> tftp-hpa-5.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tftp-hpa-5.1/CHANGES new/tftp-hpa-5.2/CHANGES --- old/tftp-hpa-5.1/CHANGES 2011-06-23 01:32:56.000000000 +0200 +++ new/tftp-hpa-5.2/CHANGES 2011-12-11 23:13:52.000000000 +0100 @@ -1,3 +1,8 @@ +Changes in 5.2: + Fix breakage on newer Linux when a single interface has + multiple IP addresses. + + Changes in 5.1: Add -P option to write a PID file. Patch by Ferenc Wagner. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tftp-hpa-5.1/tftp.spec new/tftp-hpa-5.2/tftp.spec --- old/tftp-hpa-5.1/tftp.spec 2011-06-23 01:33:28.000000000 +0200 +++ new/tftp-hpa-5.2/tftp.spec 2011-12-11 23:13:53.000000000 +0100 @@ -1,6 +1,6 @@ Summary: The client for the Trivial File Transfer Protocol (TFTP). Name: tftp -Version: 5.1 +Version: 5.2 Release: 1 License: BSD Group: Applications/Internet diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tftp-hpa-5.1/tftpd/recvfrom.c new/tftp-hpa-5.2/tftpd/recvfrom.c --- old/tftp-hpa-5.1/tftpd/recvfrom.c 2011-06-23 01:32:56.000000000 +0200 +++ new/tftp-hpa-5.2/tftpd/recvfrom.c 2011-12-11 23:13:52.000000000 +0100 @@ -51,52 +51,59 @@ #endif /* - * Check to see if this is a valid local address. If so, we should - * end up having the same local and remote address when trying to - * bind to it. + * Check to see if this is a valid local address, meaning that we can + * legally bind to it. */ static int address_is_local(const union sock_addr *addr) { - union sock_addr sa; + union sock_addr sa1, sa2; int sockfd = -1; int e; int rv = 0; socklen_t addrlen; + memcpy(&sa1, addr, sizeof sa1); + /* Multicast or universal broadcast address? */ - if (addr->sa.sa_family == AF_INET) { - if (ntohl(addr->si.sin_addr.s_addr) >= (224UL << 24)) + if (sa1.sa.sa_family == AF_INET) { + if (ntohl(sa1.si.sin_addr.s_addr) >= (224UL << 24)) return 0; + sa1.si.sin_port = 0; /* Any port */ } #ifdef HAVE_IPV6 - else if (addr->sa.sa_family == AF_INET6) { - if (IN6_IS_ADDR_MULTICAST(&addr->s6.sin6_addr)) + else if (sa1.sa.sa_family == AF_INET6) { + if (IN6_IS_ADDR_MULTICAST(&sa1.s6.sin6_addr)) return 0; + sa1.s6.sin6_port = 0; /* Any port */ } #endif else return 0; - sockfd = socket(addr->sa.sa_family, SOCK_DGRAM, 0); + sockfd = socket(sa1.sa.sa_family, SOCK_DGRAM, 0); if (sockfd < 0) goto err; - if (connect(sockfd, &addr->sa, SOCKLEN(addr))) + if (bind(sockfd, &sa1.sa, SOCKLEN(&sa1))) goto err; addrlen = SOCKLEN(addr); - if (getsockname(sockfd, (struct sockaddr *)&sa, &addrlen)) + if (getsockname(sockfd, (struct sockaddr *)&sa2, &addrlen)) goto err; - if (addr->sa.sa_family == AF_INET) - rv = sa.si.sin_addr.s_addr == addr->si.sin_addr.s_addr; + if (sa1.sa.sa_family != sa2.sa.sa_family) + goto err; + + if (sa2.sa.sa_family == AF_INET) + rv = sa1.si.sin_addr.s_addr == sa2.si.sin_addr.s_addr; #ifdef HAVE_IPV6 - else if (addr->sa.sa_family == AF_INET6) - rv = IN6_ARE_ADDR_EQUAL(&sa.s6.sin6_addr, &addr->s6.sin6_addr); + else if (sa2.sa.sa_family == AF_INET6) + rv = IN6_ARE_ADDR_EQUAL(&sa1.s6.sin6_addr, &sa2.s6.sin6_addr); #endif else rv = 0; - err: + +err: e = errno; if (sockfd >= 0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tftp-hpa-5.1/version new/tftp-hpa-5.2/version --- old/tftp-hpa-5.1/version 2011-06-23 01:32:56.000000000 +0200 +++ new/tftp-hpa-5.2/version 2011-12-11 23:13:52.000000000 +0100 @@ -1 +1 @@ -5.1 +5.2 -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de