]> git.baikalelectronics.ru Git - kernel.git/commit
net: tcp response should set oif only if it is L3 master
authorDavid Ahern <dsa@cumulusnetworks.com>
Wed, 9 Nov 2016 17:07:26 +0000 (09:07 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Nov 2016 03:32:10 +0000 (22:32 -0500)
commit1e39a6bd0ddccd455800db98348a84e91860fa6f
treec88b02204f38c11f3cce7352812a4d53de93ed9e
parent5ea35b999b159f9c484a437909922e6b3c268032
net: tcp response should set oif only if it is L3 master

Lorenzo noted an Android unit test failed due to 9ca4a077e1f0:
"The expectation in the test was that the RST replying to a SYN sent to a
closed port should be generated with oif=0. In other words it should not
prefer the interface where the SYN came in on, but instead should follow
whatever the routing table says it should do."

Revert the change to ip_send_unicast_reply and tcp_v6_send_response such
that the oif in the flow is set to the skb_iif only if skb_iif is an L3
master.

Fixes: 9ca4a077e1f0 ("net: l3mdev: remove redundant calls")
Reported-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Tested-by: Lorenzo Colitti <lorenzo@google.com>
Acked-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_output.c
net/ipv6/tcp_ipv6.c