cvs commit: src/sys/netinet tcp_subr.c
Matthew Dillon
dillon at crater.dragonflybsd.org
Thu Jun 24 00:46:17 PDT 2004
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 at xxxxxxxx>
With-help-from: Hiten Pandya <hmp at 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
More information about the Commits
mailing list