]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/sched/act_nat.c
icmp: remove duplicate code
[linux.git] / net / sched / act_nat.c
index 88a1b79a1848f84a057269c1f2765d2e96a7a36e..855a6fa16a621d8f49115f26dbc0617f1248ad3e 100644 (file)
@@ -206,9 +206,7 @@ static int tcf_nat_act(struct sk_buff *skb, const struct tc_action *a,
 
                icmph = (void *)(skb_network_header(skb) + ihl);
 
-               if ((icmph->type != ICMP_DEST_UNREACH) &&
-                   (icmph->type != ICMP_TIME_EXCEEDED) &&
-                   (icmph->type != ICMP_PARAMETERPROB))
+               if (!icmp_is_err(icmph->type))
                        break;
 
                if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + sizeof(*iph) +