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.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index aece1b15e744..28ec0a2e7b72 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -819,8 +819,12 @@ static void tcp_v6_send_response(const struct sock *sk, struct sk_buff *skb, u32
819 fl6.flowi6_proto = IPPROTO_TCP; 819 fl6.flowi6_proto = IPPROTO_TCP;
820 if (rt6_need_strict(&fl6.daddr) && !oif) 820 if (rt6_need_strict(&fl6.daddr) && !oif)
821 fl6.flowi6_oif = tcp_v6_iif(skb); 821 fl6.flowi6_oif = tcp_v6_iif(skb);
822 else 822 else {
823 fl6.flowi6_oif = oif ? : skb->skb_iif; 823 if (!oif && netif_index_is_l3_master(net, skb->skb_iif))
824 oif = skb->skb_iif;
825
826 fl6.flowi6_oif = oif;
827 }
824 828
825 fl6.flowi6_mark = IP6_REPLY_MARK(net, skb->mark); 829 fl6.flowi6_mark = IP6_REPLY_MARK(net, skb->mark);
826 fl6.fl6_dport = t1->dest; 830 fl6.fl6_dport = t1->dest;
@@ -1227,7 +1231,7 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
1227 if (skb->protocol == htons(ETH_P_IP)) 1231 if (skb->protocol == htons(ETH_P_IP))
1228 return tcp_v4_do_rcv(sk, skb); 1232 return tcp_v4_do_rcv(sk, skb);
1229 1233
1230 if (sk_filter(sk, skb)) 1234 if (tcp_filter(sk, skb))
1231 goto discard; 1235 goto discard;
1232 1236
1233 /* 1237 /*
@@ -1455,8 +1459,10 @@ process:
1455 if (tcp_v6_inbound_md5_hash(sk, skb)) 1459 if (tcp_v6_inbound_md5_hash(sk, skb))
1456 goto discard_and_relse; 1460 goto discard_and_relse;
1457 1461
1458 if (sk_filter(sk, skb)) 1462 if (tcp_filter(sk, skb))
1459 goto discard_and_relse; 1463 goto discard_and_relse;
1464 th = (const struct tcphdr *)skb->data;
1465 hdr = ipv6_hdr(skb);
1460 1466
1461 skb->dev = NULL; 1467 skb->dev = NULL;
1462 1468