aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/tcp_ipv6.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r--net/ipv6/tcp_ipv6.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index fd98dd010fcb..9d74eee334d6 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1253,6 +1253,13 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
1253 if (!want_cookie || tmp_opt.tstamp_ok) 1253 if (!want_cookie || tmp_opt.tstamp_ok)
1254 TCP_ECN_create_request(req, tcp_hdr(skb)); 1254 TCP_ECN_create_request(req, tcp_hdr(skb));
1255 1255
1256 treq->iif = sk->sk_bound_dev_if;
1257
1258 /* So that link locals have meaning */
1259 if (!sk->sk_bound_dev_if &&
1260 ipv6_addr_type(&treq->rmt_addr) & IPV6_ADDR_LINKLOCAL)
1261 treq->iif = inet6_iif(skb);
1262
1256 if (!isn) { 1263 if (!isn) {
1257 struct inet_peer *peer = NULL; 1264 struct inet_peer *peer = NULL;
1258 1265
@@ -1262,12 +1269,6 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
1262 atomic_inc(&skb->users); 1269 atomic_inc(&skb->users);
1263 treq->pktopts = skb; 1270 treq->pktopts = skb;
1264 } 1271 }
1265 treq->iif = sk->sk_bound_dev_if;
1266
1267 /* So that link locals have meaning */
1268 if (!sk->sk_bound_dev_if &&
1269 ipv6_addr_type(&treq->rmt_addr) & IPV6_ADDR_LINKLOCAL)
1270 treq->iif = inet6_iif(skb);
1271 1272
1272 if (want_cookie) { 1273 if (want_cookie) {
1273 isn = cookie_v6_init_sequence(sk, skb, &req->mss); 1274 isn = cookie_v6_init_sequence(sk, skb, &req->mss);