Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jul 1997 02:10:22 -0700 (PDT)
From:      denny1@home.com
To:        freebsd-gnats-submit@FreeBSD.ORG
Subject:   kern/4184: minor nits in sys/netatalk
Message-ID:  <199707280910.CAA19754@hub.freebsd.org>
Resent-Message-ID: <199707280920.CAA20222@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help


>Number:         4184
>Category:       kern
>Synopsis:       minor nits in sys/netatalk
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 28 02:20:02 PDT 1997
>Last-Modified:
>Originator:     Denton Gentry
>Organization:
>Release:        N/A
>Environment:
Found while porting netatalk to OpenBSD.
>Description:
  Several minor problems were uncovered while bringing up netatalk
under OpenBSD. They are attached below.

  Also a number of changes to tcpdump to better support AppleTalk
were made. Those changes have been submitted to LBL, but I do not
know when they might be included in a new tcpdump release. If FreeBSD
wants to incorporate tcpdump changes for AppleTalk before that I will
happily mail the diffs.

>How-To-Repeat:

>Fix:
  The first change was made in umich 1.4a2 relative to 1.3.3.
In aarp.c incoming AARP packets are checked against the broadcast
address. In some environments they saw broadcast wars...

coventry[145] diff -c aarp.c aarp.c.orig
*** aarp.c      Sun Jul 27 23:04:01 1997
--- aarp.c.orig Sun Jul 27 23:03:00 1997
***************
*** 319,335 ****
        return;
      }
  
-     /*
-      * Check if from broadcast address.  This could be a more robust
-      * check, since we could look for multicasts. XXX
-      */
-     if ( !bcmp(( caddr_t )ea->aarp_sha, ( caddr_t )etherbroadcastaddr,
-             sizeof( etherbroadcastaddr ))) {
-         log( LOG_ERR, "aarp: source is broadcast!\n" );
-         m_freem( m );
-         return;
-     }
- 
      op = ntohs( ea->aarp_op );
      bcopy( ea->aarp_tpnet, &net, sizeof( net ));
  
--- 319,324 ----


  The second change is in ddp_output.c. FreeBSD's port of 1.3.3
removed an m_pullup, probably because it failed for length
MLEN (can only pullup for MHLEN w/ 4.4BSD). That means phase2->phase1
routing results in mbufs at odd byte alignment. For x86 this is not
an issue, but if FreeBSD does an alpha port it will be.

coventry[146] diff -c ddp_output.c ddp_output.c.orig
*** ddp_output.c        Wed Mar  5 03:13:49 1997
--- ddp_output.c.orig   Sun Jul 27 23:05:56 1997
***************
*** 141,147 ****
       * This is bad for transition routing, since phase 1 and phase 2
       * packets end up poorly aligned due to the three byte elap header.
       */
!     if ( !(aa->aa_flags & AFA_PHASE2) ) {
        MGET( m0, M_WAIT, MT_HEADER );
        if ( m0 == 0 ) {
            m_freem( m );
--- 141,151 ----
       * This is bad for transition routing, since phase 1 and phase 2
       * packets end up poorly aligned due to the three byte elap header.
       */
!     if ( aa->aa_flags & AFA_PHASE2 ) {
!       if (( m = m_pullup( m, MIN( MHLEN, m->m_pkthdr.len ))) == 0 ) {
!           return( ENOBUFS );
!       }
!     } else {
        MGET( m0, M_WAIT, MT_HEADER );
        if ( m0 == 0 ) {
            m_freem( m );


>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707280910.CAA19754>