X-Git-Url: http://git.agner.ch/gitweb/?a=blobdiff_plain;f=net%2Fsched%2Fact_nat.c;h=570949417f388735e93bf887294326a8f24aa534;hb=c01ec7b1ea61b1c7febfe09d7751a4d916194aaf;hp=d885ba311564d9a766fce6eac37edbaf0ed82b71;hpb=a9de18eb761f7c1c860964b2e5addc1a35c7e861;p=linux-drm-fsl-dcu.git diff --git a/net/sched/act_nat.c b/net/sched/act_nat.c index d885ba311564..570949417f38 100644 --- a/net/sched/act_nat.c +++ b/net/sched/act_nat.c @@ -159,6 +159,9 @@ static int tcf_nat(struct sk_buff *skb, struct tc_action *a, iph->daddr = new_addr; csum_replace4(&iph->check, addr, new_addr); + } else if ((iph->frag_off & htons(IP_OFFSET)) || + iph->protocol != IPPROTO_ICMP) { + goto out; } ihl = iph->ihl * 4; @@ -247,6 +250,7 @@ static int tcf_nat(struct sk_buff *skb, struct tc_action *a, break; } +out: return action; drop: