From owner-freebsd-current Mon Jul 7 11:21:03 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA28483 for current-outgoing; Mon, 7 Jul 1997 11:21:03 -0700 (PDT) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id LAA28471 for ; Mon, 7 Jul 1997 11:20:56 -0700 (PDT) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id LAA24173; Mon, 7 Jul 1997 11:19:47 -0700 (PDT) Received: from current1.whistle.com(207.76.205.22) via SMTP by alpo.whistle.com, id smtpd024169; Mon Jul 7 18:19:39 1997 Message-ID: <33C132E1.59E2B600@whistle.com> Date: Mon, 07 Jul 1997 11:18:09 -0700 From: Julian Elischer Organization: Whistle Communications X-Mailer: Mozilla 3.0Gold (X11; I; FreeBSD 2.2-CURRENT i386) MIME-Version: 1.0 To: netatalk@umich.edu, current@freebsd.org Subject: Patches for netatalk and FreeBSD-current (3.0) Content-Type: multipart/mixed; boundary="------------FF6D5DF3F54BC7E1CFBAE39" Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk This is a multi-part message in MIME format. --------------FF6D5DF3F54BC7E1CFBAE39 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Here are patches for making netatalk work with the latest kernel in FreeBSD. The multicast support has changed slightly and this required that the appletalk code supply it's multicast requests in a slightly more pedantic manner. for a more complete fix the changes should be bracketed in: #if defined(__FreeBSD__) && ( __FreeBSD >= 3 ) ..fix code #endif however I'm not sure if this fix might work just as well for other systems by default. this is for 1.4b2 under FreeBSD 3.0-current as of July 6 julian --------------FF6D5DF3F54BC7E1CFBAE39 Content-Type: text/plain; charset=us-ascii; name="xx" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xx" diff -c netatalk-dist/etc/atalkd/main.c netatalk-dist.new/etc/atalkd/main.c *** netatalk-dist/etc/atalkd/main.c Mon Oct 21 15:45:03 1996 --- netatalk-dist.new/etc/atalkd/main.c Mon Jul 7 10:51:22 1997 *************** *** 18,23 **** --- 18,24 ---- #include #include #include + #include #include #include *************** *** 1149,1162 **** bootaddr( ciface ); } } else { /* configure multicast for this interface */ ! bzero( &sa, sizeof( struct sockaddr )); ! bcopy( ethermulti, sa.sa_data, sizeof( ethermulti )); ! if ( ifconfig( iface->i_name, SIOCADDMULTI, &sa )) { syslog( LOG_ERR, "addmulti: %m" ); exit( 1 ); } - zip_getnetinfo( iface ); } } --- 1150,1170 ---- bootaddr( ciface ); } } else { + struct sockaddr_dl *sdl = (struct sockaddr_dl *)&sa; /* configure multicast for this interface */ ! bzero( sdl, sizeof( struct sockaddr )); ! sdl->sdl_family = AF_LINK; ! sdl->sdl_nlen = 0 /* strlen(iface->i_name)*/; ! /*strncpy(sdl->sdl_data, iface->i_name, sdl->sdl_nlen);*/ ! bcopy( ethermulti, LLADDR(sdl), sizeof( ethermulti )); ! sdl->sdl_alen = sizeof( ethermulti ); ! sdl->sdl_len = sizeof(*sdl); ! /* (sdl->sdl_data + sdl->sdl_alen + sdl->sdl_nlen) ! - (char *)sdl; */ ! if ( ifconfig( iface->i_name, SIOCADDMULTI, sdl )) { syslog( LOG_ERR, "addmulti: %m" ); exit( 1 ); } zip_getnetinfo( iface ); } } diff -c netatalk-dist/etc/atalkd/nbp.c netatalk-dist.new/etc/atalkd/nbp.c *** netatalk-dist/etc/atalkd/nbp.c Sat Oct 5 08:17:53 1996 --- netatalk-dist.new/etc/atalkd/nbp.c Mon Jul 7 11:07:01 1997 *************** *** 7,13 **** --- 7,15 ---- #include #include #include + #include #include + #include #include #include #include *************** *** 185,190 **** --- 187,201 ---- for ( l = iface->i_rt->rt_zt; l; l = l->l_next ) { if ( zt == (struct ziptab *)l->l_data ) { /* add multicast */ + struct sockaddr_dl *sdl = (struct sockaddr_dl *)&sa; + sdl->sdl_family = AF_LINK; + sdl->sdl_nlen = 0; + bcopy( zt->zt_bcast, sdl->sdl_data, sizeof(ethermulti)); + sdl->sdl_alen = sizeof(ethermulti); + sdl->sdl_len = sizeof (*sdl); + /* (sdl->sdl_data + + sdl->sdl_alen + sdl->sdl_nlen) + - (char *)sdl; */ if ( ifconfig( iface->i_name, SIOCADDMULTI, &sa )) { syslog( LOG_ERR, "addmulti: %m" ); exit( 1 ); diff -c netatalk-dist/etc/atalkd/rtmp.c netatalk-dist.new/etc/atalkd/rtmp.c *** netatalk-dist/etc/atalkd/rtmp.c Wed Sep 18 12:05:18 1996 --- netatalk-dist.new/etc/atalkd/rtmp.c Thu Jun 5 17:48:55 1997 *************** *** 7,12 **** --- 7,13 ---- #include #include #include + #include #include #include #include --------------FF6D5DF3F54BC7E1CFBAE39--