aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/act_nat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sched/act_nat.c b/net/sched/act_nat.c
index 24e614c495f2..d0386a413e8d 100644
--- a/net/sched/act_nat.c
+++ b/net/sched/act_nat.c
@@ -218,6 +218,7 @@ static int tcf_nat(struct sk_buff *skb, struct tc_action *a,
218 if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + sizeof(*iph))) 218 if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + sizeof(*iph)))
219 goto drop; 219 goto drop;
220 220
221 icmph = (void *)(skb_network_header(skb) + ihl);
221 iph = (void *)(icmph + 1); 222 iph = (void *)(icmph + 1);
222 if (egress) 223 if (egress)
223 addr = iph->daddr; 224 addr = iph->daddr;
@@ -246,7 +247,7 @@ static int tcf_nat(struct sk_buff *skb, struct tc_action *a,
246 iph->saddr = new_addr; 247 iph->saddr = new_addr;
247 248
248 inet_proto_csum_replace4(&icmph->checksum, skb, addr, new_addr, 249 inet_proto_csum_replace4(&icmph->checksum, skb, addr, new_addr,
249 1); 250 0);
250 break; 251 break;
251 } 252 }
252 default: 253 default: