diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/route.c | 7 | ||||
-rw-r--r-- | net/ipv6/route.c | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index db1e0da871f4..50e1e0feddfc 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -993,6 +993,9 @@ void ipv4_update_pmtu(struct sk_buff *skb, struct net *net, u32 mtu, | |||
993 | struct flowi4 fl4; | 993 | struct flowi4 fl4; |
994 | struct rtable *rt; | 994 | struct rtable *rt; |
995 | 995 | ||
996 | if (!mark) | ||
997 | mark = IP4_REPLY_MARK(net, skb->mark); | ||
998 | |||
996 | __build_flow_key(&fl4, NULL, iph, oif, | 999 | __build_flow_key(&fl4, NULL, iph, oif, |
997 | RT_TOS(iph->tos), protocol, mark, flow_flags); | 1000 | RT_TOS(iph->tos), protocol, mark, flow_flags); |
998 | rt = __ip_route_output_key(net, &fl4); | 1001 | rt = __ip_route_output_key(net, &fl4); |
@@ -1010,6 +1013,10 @@ static void __ipv4_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, u32 mtu) | |||
1010 | struct rtable *rt; | 1013 | struct rtable *rt; |
1011 | 1014 | ||
1012 | __build_flow_key(&fl4, sk, iph, 0, 0, 0, 0, 0); | 1015 | __build_flow_key(&fl4, sk, iph, 0, 0, 0, 0, 0); |
1016 | |||
1017 | if (!fl4.flowi4_mark) | ||
1018 | fl4.flowi4_mark = IP4_REPLY_MARK(sock_net(sk), skb->mark); | ||
1019 | |||
1013 | rt = __ip_route_output_key(sock_net(sk), &fl4); | 1020 | rt = __ip_route_output_key(sock_net(sk), &fl4); |
1014 | if (!IS_ERR(rt)) { | 1021 | if (!IS_ERR(rt)) { |
1015 | __ip_rt_update_pmtu(rt, &fl4, mtu); | 1022 | __ip_rt_update_pmtu(rt, &fl4, mtu); |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 004fffb6c221..f0a8ff9ed891 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -1176,7 +1176,7 @@ void ip6_update_pmtu(struct sk_buff *skb, struct net *net, __be32 mtu, | |||
1176 | 1176 | ||
1177 | memset(&fl6, 0, sizeof(fl6)); | 1177 | memset(&fl6, 0, sizeof(fl6)); |
1178 | fl6.flowi6_oif = oif; | 1178 | fl6.flowi6_oif = oif; |
1179 | fl6.flowi6_mark = mark; | 1179 | fl6.flowi6_mark = mark ? mark : IP6_REPLY_MARK(net, skb->mark); |
1180 | fl6.daddr = iph->daddr; | 1180 | fl6.daddr = iph->daddr; |
1181 | fl6.saddr = iph->saddr; | 1181 | fl6.saddr = iph->saddr; |
1182 | fl6.flowlabel = ip6_flowinfo(iph); | 1182 | fl6.flowlabel = ip6_flowinfo(iph); |