diff --git a/doc/changelog.txt b/doc/changelog.txt index fd0989a..f39b119 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -1,6 +1,8 @@ HEAD ==== +Fixes: +- xt_RAWNAT: ensure correct operation in the presence of IPv4 options v2.2 (2013-03-31) diff --git a/extensions/xt_RAWNAT.c b/extensions/xt_RAWNAT.c index a52e614..858f911 100644 --- a/extensions/xt_RAWNAT.c +++ b/extensions/xt_RAWNAT.c @@ -109,7 +109,7 @@ static void rawnat4_update_l4(struct sk_buff *skb, __be32 oldip, __be32 newip) static unsigned int rawnat4_writable_part(const struct iphdr *iph) { - unsigned int wlen = sizeof(*iph); + unsigned int wlen = iph->ihl * 4; switch (iph->protocol) { case IPPROTO_TCP: