extensions: fix ipv6_find_hdr upstream change fallout
Florian Westphal
maintainerPATCH 1/1 extensions: fix ipv6_find_hdr upstream change fallout
uptream commit 84018f55ab883f03d41ec3c9ac7f0cc80830b20f (netfilter: ip6_tables: add flags parameter to ipv6_find_hdr()) changed the offset parameter of ipv6_find_hdr() to be an in-output value. Moreover, if it is non-zero, it MUST point to a valid ipv6 header embedded in the packet.
Just set it to 0.
--- doc/changelog.txt | 3 ++- extensions/xt_RAWNAT.c | 4 ++-- extensions/xt_SYSRQ.c | 2 +- extensions/xt_length2.c | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-)
doc/changelog.txt +2 -1
@@ -1,7 +1,8 @@ HEAD ==== - +Fixes: +- length2, SYSREQ, RAWNAT: fix ipv6 support with Linux 3.5 v1.45 (2012-07-16) ==================
extensions/xt_RAWNAT.c +2 -2
@@ -244,7 +244,7 @@ static unsigned int rawsnat_tg6(struct sk_buff **pskb, const struct xt_action_param *par) { const struct xt_rawnat_tginfo *info = par->targinfo; -unsigned int l4offset, l4proto; +unsigned int l4offset =0 , l4proto;struct ipv6hdr *iph;struct in6_addr new_addr;
@@ -265,7 +265,7 @@ static unsigned int rawdnat_tg6(struct sk_buff **pskb, const struct xt_action_param *par) { const struct xt_rawnat_tginfo *info = par->targinfo; -unsigned int l4offset, l4proto; +unsigned int l4offset =0 , l4proto;struct ipv6hdr *iph;struct in6_addr new_addr;
extensions/xt_SYSRQ.c +1 -1
@@ -240,7 +240,7 @@ sysrq_tg6(struct sk_buff **pskb, const struct xt_action_param *par)const struct ipv6hdr *iph;const struct udphdr *udph;unsigned short frag_off; -unsigned int th_off; +unsigned int th_off =0 ;uint16_t len;if (skb_linearize (skb) <0 )
extensions/xt_length2.c +1 -1
@@ -203,7 +203,7 @@ length2_mt6(const struct sk_buff *skb, struct xt_action_param *par)const struct xt_length_mtinfo2 *info = par->matchinfo;const struct ipv6hdr *iph =ipv6_hdr (skb);unsigned int len =0 , l4proto; -unsigned int thoff = par->thoff; +unsigned int thoff =0 ;bool hit = true;if (info->flags &XT_LENGTH_LAYER3 ) {
Signature · 1 line
1.7.8.6
Quoted 5 lines · Florian Westphal
uptream commit
84018f55ab883f03d41ec3c9ac7f0cc80830b20f(netfilter:ip6_tables: add flags parameter toipv6_find_hdr()) changed the offset parameter ofipv6_find_hdr()to be an in-output value. Moreover, if it is non-zero, it MUST point to a valid ipv6 header embedded in the packet.
Processed.