mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-04 05:11:46 +00:00
[IPV4]: Always set fl.proto in ip_route_newports
ip_route_newports uses the struct flowi from the struct rtable returned by ip_route_connect for the new route lookup and just replaces the port numbers if they have changed. If an IPsec policy exists which doesn't match port 0 the struct flowi won't have the proto field set and no xfrm lookup is done for the changed ports. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7fb76aa07f
commit
5d39a795bf
3 changed files with 6 additions and 4 deletions
|
@ -236,7 +236,7 @@ int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
|
|||
if (err)
|
||||
goto failure;
|
||||
|
||||
err = ip_route_newports(&rt, inet->sport, inet->dport, sk);
|
||||
err = ip_route_newports(&rt, IPPROTO_TCP, inet->sport, inet->dport, sk);
|
||||
if (err)
|
||||
goto failure;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue