Subject: pkg/10736: netatalk-asun pkg: ASIP broken
To: None <gnats-bugs@gnats.netbsd.org>
From: None <hauke@Espresso.Rhein-Neckar.DE>
List: netbsd-bugs
Date: 08/01/2000 15:05:44
>Number:         10736
>Category:       pkg
>Synopsis:       ASIP broken in netatalk-asun-2.1.3
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 01 14:18:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
>Release:        1.5
>Organization:
Einzeln auftretender Radfahrer
>Environment:
	
System: NetBSD elmo.causeuse.org 1.5_ALPHA NetBSD 1.5_ALPHA (SPARKLE) #19: Wed Jul 26 23:18:07 CEST 2000 hauke@elmo.causeuse.org:/usr/src/sys/arch/sparc/compile/SPARKLE sparc


>Description:
	It's great that we finally have a netatalk-asun package. 
Unfortunately, the version that was chosen (asun2.1.3) is fairly old 
and has known bugs. Trying to connect to afpd via ASIP gives

Aug  1 22:27:52 elmo afpd[6504]: dsi_tcp_open: sigaction: Invalid argument
Aug  1 22:27:52 elmo afpd[6503]: server_child[1] 6504 exited 1
Aug  1 22:27:58 elmo afpd[6505]: session from 340.23:250 on 339.146:129
Aug  1 22:27:58 elmo afpd[6505]: login hauke (uid 100, gid 0)
Aug  1 22:28:16 elmo afpd[6505]: done
Aug  1 22:28:16 elmo afpd[6503]: server_child[0] 6505 done
Aug  1 22:28:28 elmo afpd[6506]: dsi_tcp_open: sigaction: Invalid argument
Aug  1 22:28:28 elmo afpd[6503]: server_child[1] 6506 exited 1


which is fixed in Adrian Sun's 2.1.4pre versions. For another 
error description and patch see


---<snip>------------------------------------------------------------
Date: Sun, 30 Apr 2000 14:14:37 -0500
To: Herb Singleton <hsingleton@flashcom.net>
From: Donald Lee <donlee_68k@icompute.com>
Subject: Re: Netatalk ASUN ASIP problems
Cc: port-mac68k@netbsd.org

There was a bug in some of the pre-2.1.3 asun snapshots in the
libatalk/dsi/dsi_tcp.c file where a stack variable was not
getting initialized.  It's fixed in the latest source, I believe...

-dgl-

*** netatalk-1.4b2+asun2.1.3/libatalk/dsi/dsi_tcp.c     Wed Nov 18 01:59:25 1998
--- fixed/libatalk/dsi/dsi_tcp.c        Mon Feb 28 00:35:21 2000
***************
*** 102,119 ****
--- 102,124 ----
      signal(SIGTERM, SIG_DFL);
      signal(SIGHUP, SIG_DFL);

      /* install an alarm to deal with non-responsive connections */
      if (setitimer(ITIMER_REAL, &timer, 0) < 0) {
        syslog(LOG_ERR, "dsi_tcp_open: setitimer: %m");
        exit(1);
      }
      newact.sa_handler = timeout_handler;
+     sigemptyset(&newact.sa_mask);
+     newact.sa_flags = 0;
+     oldact.sa_handler = NULL;
+     sigemptyset(&oldact.sa_mask);
+     oldact.sa_flags = 0;
      if (sigaction(SIGALRM, &newact, &oldact) < 0) {
        syslog(LOG_ERR, "dsi_tcp_open: sigaction: %m");
        exit(1);
      }

      /* read in commands. this is similar to dsi_receive except
       * for the fact that we do some sanity checking to prevent
       * delinquent connections from causing mischief. */

>How-To-Repeat:
	Build the netatalk-asun package and run it; connect to 
the afpd server via ASIP.


>Fix:
	Add the enclosed patch or (better) use asun2.1.4pre35 for the 
package -- I have it in production use at work for more than half a 
year now and have yet to see any problems. pre38 has the codepage code 
disabled which makes it unsuitable for use together with samba.
>Release-Note:
>Audit-Trail:
>Unformatted:
 >I'm trying to run netatalk-1.4b2+asun2.1.3  on a Quadra 650 running NetBSD
 >1.4.1. The Quadra is currently running as a IPNAT server, with a DSL line
 >plugged into the internal ethernet card, and my internal network/Appletalk
 >network on an Asante ethernet card.
 >
 >Netatalk compiled fine, and appears to startup okay. However, when I use the
 >Chooser to connect my Mac to the Quadra running Netatalk, NetBSD gives me a
 >"Apr 15 22:19:22 hostname afpd [222]: dsi_tcp_open: sigaction: Invalid
 >argument" error and only lets me connect using ethertalk. If I try to
 >connect over IP using the "Server IP Address" button in the Chooser, the Mac
 >tells me "No response from server. Please try again"
 >
 >Does anyone have any idea about what is happening? I have a MkLinux box on
 >the same network running asun2.1.3 (installed via RPM) and it works fine.
 >Also, IPNAT and other IP-based networking is working fine. My atalkd.conf is
 >currently:
 >
 >#sn0 -phase 2 -net 65280-65534 -addr 65280.244
 >ae0 -phase 2 -net 0-65534 -addr 65280.244
 >
 >(I commented out the sn0 line because I'm using the internal ethernet for
 >the DSL connection)
 > 
 >/var/log/messages reports:
 >
 >Apr 15 23:56:16 reverberant atalkd[203]: restart (1.4b2+asun2.1.3)
 >Apr 15 23:56:19 reverberant atalkd[203]: zip_getnetinfo for ae0
 >Apr 15 23:56:36 reverberant last message repeated 2 times
 >Apr 15 23:56:46 reverberant atalkd[203]: config for no router
 >Apr 15 23:56:49 reverberant atalkd[203]: ready 0/0/0
 >Apr 15 23:57:09 reverberant afpd[218]: reverberant:AFPServer@* started on
 >65280.
 >244:130 (1.4b2+asun2.1.3)
 >Apr 15 23:57:10 reverberant afpd[218]: ASIP started on 192.168.3.1:548(1)
 >(1.4b2
 >+asun2.1.3) 
 >Apr 15 23:57:19 reverberant afpd[222]: dsi_tcp_open: sigaction: Invalid
 >argument
 >Apr 15 23:57:19 reverberant afpd[218]: server_child[1] 222 exited 1
 >Apr 15 23:57:21 reverberant afpd[223]: session from 65280.128:244 on
 >65280.244:1
 >29
 >Apr 15 23:57:21 reverberant afpd[223]: login hls (uid 101, gid 0)
 >Apr 15 23:58:33 reverberant afpd[223]: done
 >Apr 15 23:58:33 reverberant afpd[218]: server_child[0] 223 done
 >Apr 15 23:58:40 reverberant afpd[224]: dsi_tcp_open: sigaction: Invalid
 >argument
 >Apr 15 23:58:40 reverberant afpd[218]: server_child[1] 224 exited 1
 
 ---<snip>------------------------------------------------------------