xfrm4: Invalidate all ipv4 routes on IPsec pmtu events
[firefly-linux-kernel-4.4.55.git] / net / ipv4 / ah4.c
index a154d0a08c795affe1462f96ef886cf445847485..a69b4e4a02b5099043d98e5278355274e18ea72b 100644 (file)
@@ -420,9 +420,12 @@ static void ah4_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_AH, 0);
-       else
+       else
                ipv4_redirect(skb, net, 0, 0, IPPROTO_AH, 0);
        xfrm_state_put(x);
 }