Commit c45fb108 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by David S. Miller

[NETFILTER]: PPTP helper: fixup gre_keymap_lookup() return type

GRE keys are 16-bit wide.
Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ae5b7d8b
...@@ -77,10 +77,10 @@ static inline int gre_key_cmpfn(const struct ip_ct_gre_keymap *km, ...@@ -77,10 +77,10 @@ static inline int gre_key_cmpfn(const struct ip_ct_gre_keymap *km,
} }
/* look up the source key for a given tuple */ /* look up the source key for a given tuple */
static u_int32_t gre_keymap_lookup(struct ip_conntrack_tuple *t) static __be16 gre_keymap_lookup(struct ip_conntrack_tuple *t)
{ {
struct ip_ct_gre_keymap *km; struct ip_ct_gre_keymap *km;
u_int32_t key = 0; __be16 key = 0;
read_lock_bh(&ip_ct_gre_lock); read_lock_bh(&ip_ct_gre_lock);
km = LIST_FIND(&gre_keymap_list, gre_key_cmpfn, km = LIST_FIND(&gre_keymap_list, gre_key_cmpfn,
...@@ -190,7 +190,7 @@ static int gre_pkt_to_tuple(const struct sk_buff *skb, ...@@ -190,7 +190,7 @@ static int gre_pkt_to_tuple(const struct sk_buff *skb,
struct ip_conntrack_tuple *tuple) struct ip_conntrack_tuple *tuple)
{ {
struct gre_hdr_pptp _pgrehdr, *pgrehdr; struct gre_hdr_pptp _pgrehdr, *pgrehdr;
u_int32_t srckey; __be16 srckey;
struct gre_hdr _grehdr, *grehdr; struct gre_hdr _grehdr, *grehdr;
/* first only delinearize old RFC1701 GRE header */ /* first only delinearize old RFC1701 GRE header */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment