netfilter: reject: don't send icmp error if csum is invalid
[deliverable/linux.git] / net / ipv4 / netfilter / ipt_REJECT.c
index 8f48f5517e336e61e3457379744fffd792816fcb..87907d4bd259a725cfeea6e4cbccb77be7995972 100644 (file)
@@ -34,31 +34,32 @@ static unsigned int
 reject_tg(struct sk_buff *skb, const struct xt_action_param *par)
 {
        const struct ipt_reject_info *reject = par->targinfo;
+       int hook = par->hooknum;
 
        switch (reject->with) {
        case IPT_ICMP_NET_UNREACHABLE:
-               nf_send_unreach(skb, ICMP_NET_UNREACH);
+               nf_send_unreach(skb, ICMP_NET_UNREACH, hook);
                break;
        case IPT_ICMP_HOST_UNREACHABLE:
-               nf_send_unreach(skb, ICMP_HOST_UNREACH);
+               nf_send_unreach(skb, ICMP_HOST_UNREACH, hook);
                break;
        case IPT_ICMP_PROT_UNREACHABLE:
-               nf_send_unreach(skb, ICMP_PROT_UNREACH);
+               nf_send_unreach(skb, ICMP_PROT_UNREACH, hook);
                break;
        case IPT_ICMP_PORT_UNREACHABLE:
-               nf_send_unreach(skb, ICMP_PORT_UNREACH);
+               nf_send_unreach(skb, ICMP_PORT_UNREACH, hook);
                break;
        case IPT_ICMP_NET_PROHIBITED:
-               nf_send_unreach(skb, ICMP_NET_ANO);
+               nf_send_unreach(skb, ICMP_NET_ANO, hook);
                break;
        case IPT_ICMP_HOST_PROHIBITED:
-               nf_send_unreach(skb, ICMP_HOST_ANO);
+               nf_send_unreach(skb, ICMP_HOST_ANO, hook);
                break;
        case IPT_ICMP_ADMIN_PROHIBITED:
-               nf_send_unreach(skb, ICMP_PKT_FILTERED);
+               nf_send_unreach(skb, ICMP_PKT_FILTERED, hook);
                break;
        case IPT_TCP_RESET:
-               nf_send_reset(skb, par->hooknum);
+               nf_send_reset(skb, hook);
        case IPT_ICMP_ECHOREPLY:
                /* Doesn't happen. */
                break;
This page took 0.025176 seconds and 5 git commands to generate.