From owner-freebsd-ports Mon Jun 15 20:10:53 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA18434 for freebsd-ports-outgoing; Mon, 15 Jun 1998 20:10:53 -0700 (PDT) (envelope-from owner-freebsd-ports@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA18425 for ; Mon, 15 Jun 1998 20:10:51 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id UAA22645; Mon, 15 Jun 1998 20:10:00 -0700 (PDT) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA17015 for ; Mon, 15 Jun 1998 20:02:18 -0700 (PDT) (envelope-from julian@whistle.com) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id TAA05736 for ; Mon, 15 Jun 1998 19:55:03 -0700 (PDT) Received: from current1.whistle.com(207.76.205.22) via SMTP by alpo.whistle.com, id smtpd005725; Tue Jun 16 02:54:54 1998 Received: (from julian@localhost) by current1.whistle.com (8.8.7/8.7.3) id TAA08067; Mon, 15 Jun 1998 19:54:51 -0700 (PDT) Message-Id: <199806160254.TAA08067@current1.whistle.com> Date: Mon, 15 Jun 1998 19:54:51 -0700 (PDT) From: Julian Elischer Reply-To: julian@whistle.com To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: ports/6961: netatalk needs tweek for 3.0 multicasting [patch] Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 6961 >Category: ports >Synopsis: netatalk needs tweek for 3.0 multicasting [patch] >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jun 15 20:10:00 PDT 1998 >Last-Modified: >Originator: Julian Elischer >Organization: Whistle Communications, Inc. >Release: FreeBSD 3.0.0-current i386 >Environment: FreeBSD 3.0 changes the type of the sockaddr needed to request a link-layer multicast address. FreeBSD 3.0 has changed this so that it is incompatible with other systems and FreeBSD 2.2. >Description: Netatalk cannot do correct zone manipulations with multicast addressing. >How-To-Repeat: start netatlk.. watch atalk log files for: atalkd[340]: addmulti: Invalid argument >Fix: The following patch needs to be incorporated into the netatalk port. Index: etc/atalkd/main.c =================================================================== RCS file: /cvs/mod/umich/netatalk/etc/atalkd/main.c,v retrieving revision 1.1.1.3.2.3 retrieving revision 1.1.1.3.2.4 diff -c -r1.1.1.3.2.3 -r1.1.1.3.2.4 *** main.c 1996/10/11 01:50:34 1.1.1.3.2.3 --- main.c 1998/06/16 02:24:27 1.1.1.3.2.4 *************** *** 17,22 **** --- 17,25 ---- #include #include #include + #if ( __FreeBSD__ >= 3 ) + #include + #endif #include #include *************** *** 1146,1154 **** --- 1149,1171 ---- bootaddr( ciface ); } } else { + #if ( __FreeBSD__ >= 3 ) + struct sockaddr_dl *dlp; + /* configure multicast for this interface */ bzero( &sa, sizeof( struct sockaddr )); + dlp = (struct sockaddr_dl *)&sa; + dlp->sdl_len = sizeof(struct sockaddr_dl); + dlp->sdl_family = AF_LINK; + dlp->sdl_index = 0; + dlp->sdl_nlen = 0; + dlp->sdl_alen = 6; + dlp->sdl_slen = 0; + bcopy (ethermulti, LLADDR(dlp), sizeof( ethermulti )); + #else + bzero( &sa, sizeof( struct sockaddr )); bcopy( ethermulti, sa.sa_data, sizeof( ethermulti )); + #endif if ( ifconfig( iface->i_name, SIOCADDMULTI, &sa )) { syslog( LOG_ERR, "addmulti: %m" ); exit( 1 ); Index: etc/atalkd/nbp.c =================================================================== RCS file: /cvs/mod/umich/netatalk/etc/atalkd/nbp.c,v retrieving revision 1.1.1.3.2.1 retrieving revision 1.1.1.3.2.3 diff -c -r1.1.1.3.2.1 -r1.1.1.3.2.3 *** nbp.c 1998/01/10 00:09:18 1.1.1.3.2.1 --- nbp.c 1998/06/16 02:39:03 1.1.1.3.2.3 *************** *** 9,14 **** --- 9,17 ---- #include #include #include + #if ( __FreeBSD__ >= 3 ) + #include + #endif #include #include #include *************** *** 176,184 **** } bcopy( zone_mcast( zt->zt_name, zt->zt_len ), zt->zt_bcast, sizeof( ethermulti )); bzero( &sa, sizeof( struct sockaddr )); bcopy( zt->zt_bcast, sa.sa_data, sizeof( ethermulti )); ! for ( iface = interfaces; iface; iface = iface->i_next ) { if (( iface->i_flags & IFACE_PHASE2 ) == 0 ) { continue; --- 179,203 ---- } bcopy( zone_mcast( zt->zt_name, zt->zt_len ), zt->zt_bcast, sizeof( ethermulti )); + #if ( __FreeBSD__ >= 3 ) + { + struct sockaddr_dl *dlp; + + /* configure multicast for this interface */ + bzero( &sa, sizeof( struct sockaddr )); + dlp = (struct sockaddr_dl *)&sa; + dlp->sdl_len = sizeof(struct sockaddr_dl); + dlp->sdl_family = AF_LINK; + dlp->sdl_index = 0; + dlp->sdl_nlen = 0; + dlp->sdl_alen = 6; + dlp->sdl_slen = 0; + bcopy (zt->zt_bcast, LLADDR(dlp), sizeof( ethermulti )); + } + #else bzero( &sa, sizeof( struct sockaddr )); bcopy( zt->zt_bcast, sa.sa_data, sizeof( ethermulti )); ! #endif for ( iface = interfaces; iface; iface = iface->i_next ) { if (( iface->i_flags & IFACE_PHASE2 ) == 0 ) { continue; >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message