Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Sep 2009 17:53:01 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/netinet if_ether.c
Message-ID:  <200909011753.n81HrMEi017602@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
bz          2009-09-01 17:53:01 UTC

  FreeBSD src repository

  Modified files:
    sys/netinet          if_ether.c 
  Log:
  SVN rev 196738 on 2009-09-01 17:53:01Z by bz
  
  In case an upper layer protocol tries to send a packet but the
  L2 code does not have the ethernet address for the destination
  within the broadcast domain in the table, we remember the
  original mbuf in `la_hold' in arpresolve() and send out a
  different packet with an arp request.
  In case there will be more upper layer packets to send we will
  free an earlier one held in `la_hold' and queue the new one.
  
  Once we get a packet in, with which we can perfect our arp table
  entry we send out the original 'on hold' packet, should there
  be any.
  Rather than continuing to process the packet that we received,
  we returned without freeing the packet that came in, which
  basically means that we leaked an mbuf for every arp request
  we sent.
  
  Rather than freeing the received packet and returning, continue
  to process the incoming arp packet as well.
  This should (a) improve some setups, also proxy-arp, in case it was an
  incoming arp request and (b) resembles the behaviour FreeBSD had
  from day 1, which alignes with RFC826 "Packet reception" (merge case).
  
  Rename 'm0' to 'hold' to make the code more understandable as
  well as diffable to earlier versions more easily.
  
  Handle the link-layer entry 'la' lock comepletely in the block
  where needed and release it as early as possible, rather than
  holding it longer, down to the end of the function.
  
  Found by:                       pointyhat, ns1
  Bug hunting session with:       erwin, simon, rwatson
  Tested by:                      simon on cluster machines
  Reviewed by:                    ratson, kmacy, julian
  MFC after:                      3 days
  
  Revision  Changes    Path
  1.209     +10 -12    src/sys/netinet/if_ether.c



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