]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r196738:
authorbz <bz@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 2 Sep 2009 16:35:57 +0000 (16:35 +0000)
committerbz <bz@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 2 Sep 2009 16:35:57 +0000 (16:35 +0000)
commit2c1996b0583274b3f6b3902f03b84f275dd63d7d
treeca97b270419067d0fc02d9afc0ca1c5409bcfe4d
parent90edb1e94ae7d7a6e84c53fffa8f5a62d3c62c4d
MFC r196738:
  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

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196770 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/netinet/if_ether.c