aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-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 36131d122a6..2dea4bb7b54 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1255,6 +1255,13 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
1255 if (!want_cookie || tmp_opt.tstamp_ok) 1255 if (!want_cookie || tmp_opt.tstamp_ok)
1256 TCP_ECN_create_request(req, tcp_hdr(skb)); 1256 TCP_ECN_create_request(req, tcp_hdr(skb));
1257 1257
1258 treq->iif = sk->sk_bound_dev_if;
1259
1260 /* So that link locals have meaning */
1261 if (!sk->sk_bound_dev_if &&
1262 ipv6_addr_type(&treq->rmt_addr) & IPV6_ADDR_LINKLOCAL)
1263 treq->iif = inet6_iif(skb);
1264
1258 if (!isn) { 1265 if (!isn) {
1259 struct inet_peer *peer = NULL; 1266 struct inet_peer *peer = NULL;
1260 1267
@@ -1264,12 +1271,6 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
1264 atomic_inc(&skb->users); 1271 atomic_inc(&skb->users);
1265 treq->pktopts = skb; 1272 treq->pktopts = skb;
1266 } 1273 }
1267 treq->iif = sk->sk_bound_dev_if;
1268
1269 /* So that link locals have meaning */
1270 if (!sk->sk_bound_dev_if &&
1271 ipv6_addr_type(&treq->rmt_addr) & IPV6_ADDR_LINKLOCAL)
1272 treq->iif = inet6_iif(skb);
1273 1274
1274 if (want_cookie) { 1275 if (want_cookie) {
1275 isn = cookie_v6_init_sequence(sk, skb, &req->mss); 1276 isn = cookie_v6_init_sequence(sk, skb, &req->mss);