xfrm4: Invalidate all ipv4 routes on IPsec pmtu events
[~shefty/rdma-dev.git] / net / ipv4 / esp4.c
index fd26ff4f3eac1e1fc03e8fc0d86b1b52729e0134..3b4f0cd2e63edbd136683577873b288712a4b92a 100644 (file)
@@ -502,9 +502,12 @@ static void esp4_err(struct sk_buff *skb, u32 info)
        if (!x)
                return;
 
-       if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH)
+       if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) {
+               atomic_inc(&flow_cache_genid);
+               rt_genid_bump(net);
+
                ipv4_update_pmtu(skb, net, info, 0, 0, IPPROTO_ESP, 0);
-       else
+       else
                ipv4_redirect(skb, net, 0, 0, IPPROTO_ESP, 0);
        xfrm_state_put(x);
 }