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