aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/netfilter/ip_conntrack_helper_pptp.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2005-09-22 23:45:24 -0700
committerDavid S. Miller <davem@davemloft.net>2005-09-22 23:45:24 -0700
commit67497205b12e3cb408259cc09b50c3a9d12cd935 (patch)
treeb06cc4b76736ca7df03717f30ff57cab8848ab2a /net/ipv4/netfilter/ip_conntrack_helper_pptp.c
parent[NETFILTER] fix DEBUG statement in PPTP helper (diff)
downloadlinux-dev-67497205b12e3cb408259cc09b50c3a9d12cd935.tar.xz
linux-dev-67497205b12e3cb408259cc09b50c3a9d12cd935.zip
[NETFILTER] Fix sparse endian warnings in pptp helper
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/ipv4/netfilter/ip_conntrack_helper_pptp.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_pptp.c b/net/ipv4/netfilter/ip_conntrack_helper_pptp.c
index 117587978700..8236ee0fb090 100644
--- a/net/ipv4/netfilter/ip_conntrack_helper_pptp.c
+++ b/net/ipv4/netfilter/ip_conntrack_helper_pptp.c
@@ -223,8 +223,8 @@ static void pptp_destroy_siblings(struct ip_conntrack *ct)
static inline int
exp_gre(struct ip_conntrack *master,
u_int32_t seq,
- u_int16_t callid,
- u_int16_t peer_callid)
+ __be16 callid,
+ __be16 peer_callid)
{
struct ip_conntrack_tuple inv_tuple;
struct ip_conntrack_tuple exp_tuples[] = {
@@ -263,7 +263,7 @@ exp_gre(struct ip_conntrack *master,
exp_orig->mask.src.ip = 0xffffffff;
exp_orig->mask.src.u.all = 0;
exp_orig->mask.dst.u.all = 0;
- exp_orig->mask.dst.u.gre.key = 0xffff;
+ exp_orig->mask.dst.u.gre.key = htons(0xffff);
exp_orig->mask.dst.ip = 0xffffffff;
exp_orig->mask.dst.protonum = 0xff;
@@ -340,7 +340,8 @@ pptp_inbound_pkt(struct sk_buff **pskb,
unsigned int reqlen;
union pptp_ctrl_union _pptpReq, *pptpReq;
struct ip_ct_pptp_master *info = &ct->help.ct_pptp_info;
- u_int16_t msg, *cid, *pcid;
+ u_int16_t msg;
+ __be16 *cid, *pcid;
u_int32_t seq;
ctlh = skb_header_pointer(*pskb, nexthdr_off, sizeof(_ctlh), &_ctlh);
@@ -551,7 +552,8 @@ pptp_outbound_pkt(struct sk_buff **pskb,
unsigned int reqlen;
union pptp_ctrl_union _pptpReq, *pptpReq;
struct ip_ct_pptp_master *info = &ct->help.ct_pptp_info;
- u_int16_t msg, *cid, *pcid;
+ u_int16_t msg;
+ __be16 *cid, *pcid;
ctlh = skb_header_pointer(*pskb, nexthdr_off, sizeof(_ctlh), &_ctlh);
if (!ctlh)
@@ -755,7 +757,7 @@ static struct ip_conntrack_helper pptp = {
}
},
.mask = { .src = { .ip = 0,
- .u = { .tcp = { .port = 0xffff } }
+ .u = { .tcp = { .port = __constant_htons(0xffff) } }
},
.dst = { .ip = 0,
.u = { .all = 0 },