Hello community,

here is the log from the commit of package atftp for openSUSE:Factory checked 
in at 2011-11-24 15:26:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/atftp (Old)
 and      /work/SRC/openSUSE:Factory/.atftp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "atftp", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/atftp/atftp.changes      2011-09-23 
01:52:08.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.atftp.new/atftp.changes 2011-11-24 
14:26:49.000000000 +0100
@@ -1,0 +2,17 @@
+Wed Nov  9 15:13:18 UTC 2011 - [email protected]
+
+- licence in spdx format
+
+-------------------------------------------------------------------
+Thu Nov  3 16:56:46 UTC 2011 - [email protected]
+
+- fixed the "Sorcerer's Apprentice Syndrome" bug
+  (bnc#727843)
+
+-------------------------------------------------------------------
+Sat Sep 17 13:28:52 UTC 2011 - [email protected]
+
+- Remove redundant tags/sections from specfile
+- Use %_smp_mflags for parallel build
+
+-------------------------------------------------------------------

New:
----
  atftp-0.7-sorcerers_apprentice.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ atftp.spec ++++++
--- /var/tmp/diff_new_pack.jK29Ct/_old  2011-11-24 14:26:51.000000000 +0100
+++ /var/tmp/diff_new_pack.jK29Ct/_new  2011-11-24 14:26:51.000000000 +0100
@@ -15,7 +15,6 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
-# norootforbuild
 
 %define pkg_version 0.7
 
@@ -23,7 +22,7 @@
 Summary:        Advanced TFTP Server and Client
 Version:        0.7.0
 Release:        145
-License:        GPLv2+
+License:        GPL-2.0+
 Group:          System/Daemons
 Url:            ftp://ftp.mamalinux.com/pub/atftp/
 Source:         %{name}-%{pkg_version}.tar.bz2
@@ -38,10 +37,11 @@
 Patch6:         atftp-0.7_bug-213384_OPT_NUMBER.patch
 Patch7:         atftpd-0.7_unprotected_assignments_crash.patch
 Patch8:         atftpd-0.7_circumvent_tftp_size_restrictions.patch
+# PATCH-FIX-SUSE sorcerer's apprentice syndrom (bnc#727843)
+Patch9:         atftp-0.7-sorcerers_apprentice.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 PreReq:         %insserv_prereq  %fillup_prereq
 PreReq:         pwdutils
-BuildRequires:  pwdutils
 BuildRequires:  pcre-devel readline-devel tcpd-devel
 Conflicts:      tftp
 Recommends:     logrotate
@@ -65,11 +65,12 @@
 %patch6
 %patch7
 %patch8
+%patch9 -p1
 
 %build
 autoreconf -fi
 %configure
-%{__make}
+make %{?_smp_mflags}
 
 %install
 %makeinstall
@@ -105,9 +106,6 @@
 %restart_on_update atftpd
 %{insserv_cleanup}
 
-%clean
-%{__rm} -rf %{buildroot}
-
 %files
 %defattr(-,root,root)
 %doc BUGS FAQ LICENSE README README.MCAST README.PCRE TODO

++++++ atftp-0.7-sorcerers_apprentice.patch ++++++
Index: atftp-0.7/tftp_file.c
===================================================================
--- atftp-0.7.orig/tftp_file.c  2011-11-22 15:12:53.792744083 +0100
+++ atftp-0.7/tftp_file.c       2011-11-22 15:13:51.706421893 +0100
@@ -605,6 +605,7 @@
      int timeout_state = state; /* what state should we go on when timeout */
      int result;
      long block_number = 0;
+     long last_requested_block = -1;
      long last_block = -1;
      int data_size;             /* size of data received */
      int sockfd = data->sockfd; /* just to simplify calls */
@@ -765,6 +766,17 @@
                          connected = 1;
                     }
                     block_number = ntohs(tftphdr->th_block);
+
+                    if (last_requested_block >= block_number)
+                    {
+                        if (data->trace)
+                            fprintf(stderr, "received duplicated ACK <block: 
%ld >= %ld>\n",
+                                    last_requested_block, block_number);
+                        break;
+                    }
+                    else
+                        last_requested_block = block_number;
+
                     if (data->trace)
                          fprintf(stderr, "received ACK <block: %ld>\n",
                                  block_number);
Index: atftp-0.7/tftpd_file.c
===================================================================
--- atftp-0.7.orig/tftpd_file.c 2011-11-22 15:12:53.793744112 +0100
+++ atftp-0.7/tftpd_file.c      2011-11-22 15:15:04.617534260 +0100
@@ -403,6 +403,7 @@
      int timeout_state = state;
      int result;
      long block_number = 0;
+     long last_requested_block = -1;
      long last_block = -1;
      int block_loops = 0;
      int data_size;
@@ -859,6 +860,32 @@
                     {
                          logger(LOG_DEBUG, "received ACK <block: %d>", 
block_number);
                     }
+
+                   /* check whether the block request isn't already fulfilled 
*/
+
+                    /* multicast, block numbers could contain gaps */
+                    if (multicast) {
+                        if (last_requested_block >= block_number)
+                        {
+                            if (data->trace)
+                                logger(LOG_DEBUG, "received duplicated ACK 
<block: %d >= %d>", last_requested_block, block_number);
+                            break;
+                        }
+                        else
+                            last_requested_block = block_number;
+                    /* unicast, blocks should be requested one after another */
+                   } else {
+                        if (last_requested_block + 1 != block_number && 
last_requested_block != -1)
+                        {
+                            if (data->trace)
+                                logger(LOG_DEBUG, "received out of order ACK 
<block: %d != %d>", last_requested_block + 1, block_number);
+                            break;
+                        }
+                        else
+                            last_requested_block = block_number;
+                    }
+
+
                     if (ntohs(tftphdr->th_block) == 65535)
                     {
                          block_loops++;
@@ -958,6 +985,8 @@
                          /* nedd to send an oack to that client */
                          state = S_SEND_OACK;                
                          fseek(fp, 0, SEEK_SET);
+                        /* reset the last block received counter */
+                        last_requested_block = -1;
                     }
                     else
                     {
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to