DragonFly BSD
DragonFly commits List (threaded) for 2004-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

cvs commit: src/sys/netinet tcp_subr.c


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 24 Jun 2004 00:45:22 -0700 (PDT)

dillon      2004/06/24 00:45:22 PDT

DragonFly src repository

  Modified files:
    sys/netinet          tcp_subr.c 
  Log:
  The route table treats sockaddr data as opaque, which means that the unused
  fields in the structure passed to rtalloc() MUST BE ZERO.
  
  The syncache code allocates a governing struct syncache structure which
  contains an embedded struct route, but it does not zero this structure.
  When used in a mixed IPV4/IPV6 environment, it is possible for a structure
  to be allocated for IPV4 whos unused fields for the route lookup (e.g.
  sin_port and sin_zero) may contain garbage.  This screws up the route
  table lookup and causes the wrong route to be returned.
  
  I believe the proper fix in this case is to rewrite the route table code,
  but since that would take a very long time the fix I am committing is
  to have tcp_rtlookup() zero out the sockaddr_in before it builds it for
  the rtalloc() call.
  
  Reported-by: Richard Nyberg <rnyberg@xxxxxxxx>
  With-help-from: Hiten Pandya <hmp@xxxxxxxx>
  
  Revision  Changes    Path
  1.34      +10 -0     src/sys/netinet/tcp_subr.c


http://www.dragonflybsd.org/cvsweb/src/sys/netinet/tcp_subr.c.diff?r1=1.33&r2=1.34&f=u



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]