* [PATCH] gre_in_range: 16/32 bit fix
@ 2006-05-18 13:38 Alexey Dobriyan
2006-05-18 14:47 ` Patrick McHardy
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2006-05-18 13:38 UTC (permalink / raw)
To: netdev; +Cc: netfilter-devel
GRE keys are 16 bit.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
net/ipv4/netfilter/ip_nat_proto_gre.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/net/ipv4/netfilter/ip_nat_proto_gre.c
+++ 1/net/ipv4/netfilter/ip_nat_proto_gre.c
@@ -49,15 +49,15 @@ gre_in_range(const struct ip_conntrack_t
const union ip_conntrack_manip_proto *min,
const union ip_conntrack_manip_proto *max)
{
- u_int32_t key;
+ __be16 key;
if (maniptype == IP_NAT_MANIP_SRC)
key = tuple->src.u.gre.key;
else
key = tuple->dst.u.gre.key;
- return ntohl(key) >= ntohl(min->gre.key)
- && ntohl(key) <= ntohl(max->gre.key);
+ return ntohs(key) >= ntohs(min->gre.key)
+ && ntohs(key) <= ntohs(max->gre.key);
}
/* generate unique tuple ... */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] gre_in_range: 16/32 bit fix
2006-05-18 13:38 [PATCH] gre_in_range: 16/32 bit fix Alexey Dobriyan
@ 2006-05-18 14:47 ` Patrick McHardy
0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2006-05-18 14:47 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: netdev, netfilter-devel
Alexey Dobriyan wrote:
> GRE keys are 16 bit.
Thanks, I've combined both patches and added them to me tree, will
push to Dave soon.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-05-18 14:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-18 13:38 [PATCH] gre_in_range: 16/32 bit fix Alexey Dobriyan
2006-05-18 14:47 ` Patrick McHardy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).