summaryrefslogtreecommitdiff
path: root/include/net/garp.h
diff options
context:
space:
mode:
authorJulian Anastasov <ja@ssi.bg>2012-02-04 13:04:46 +0000
committerDavid S. Miller <davem@davemloft.net>2012-02-04 19:29:48 -0500
commite6b45241c57a83197e5de9166b3b0d32ac562609 (patch)
tree8a2e351a564e2cb4be6351c66df4b1a8732bff89 /include/net/garp.h
parente2446eaab5585555a38ea0df4e01ff313dbb4ac9 (diff)
ipv4: reset flowi parameters on route connect
Eric Dumazet found that commit 813b3b5db83 (ipv4: Use caller's on-stack flowi as-is in output route lookups.) that comes in 3.0 added a regression. The problem appears to be that resulting flowi4_oif is used incorrectly as input parameter to some routing lookups. The result is that when connecting to local port without listener if the IP address that is used is not on a loopback interface we incorrectly assign RTN_UNICAST to the output route because no route is matched by oif=lo. The RST packet can not be sent immediately by tcp_v4_send_reset because it expects RTN_LOCAL. So, change ip_route_connect and ip_route_newports to update the flowi4 fields that are input parameters because we do not want unnecessary binding to oif. To make it clear what are the input parameters that can be modified during lookup and to show which fields of floiw4 are reused add a new function to update the flowi4 structure: flowi4_update_output. Thanks to Yurij M. Plotnikov for providing a bug report including a program to reproduce the problem. Thanks to Eric Dumazet for tracking the problem down to tcp_v4_send_reset and providing initial fix. Reported-by: Yurij M. Plotnikov <Yurij.Plotnikov@oktetlabs.ru> Signed-off-by: Julian Anastasov <ja@ssi.bg> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/garp.h')
0 files changed, 0 insertions, 0 deletions