[PATCH] s/;;/;/g
[safe/jmp/linux-2.6] / net / ipv4 / netfilter / ip_conntrack_helper_pptp.c
index 79db5b7..d716bba 100644 (file)
@@ -172,7 +172,6 @@ static int destroy_sibling_or_exp(const struct ip_conntrack_tuple *t)
                DEBUGP("setting timeout of conntrack %p to 0\n", sibling);
                sibling->proto.gre.timeout = 0;
                sibling->proto.gre.stream_timeout = 0;
-               /* refresh_acct will not modify counters if skb == NULL */
                if (del_timer(&sibling->timeout))
                        sibling->timeout.function((unsigned long)sibling);
                ip_conntrack_put(sibling);
@@ -223,8 +222,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 +262,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;
                
@@ -271,14 +270,10 @@ exp_gre(struct ip_conntrack *master,
        exp_orig->expectfn = pptp_expectfn;
        exp_orig->flags = 0;
 
-       exp_orig->dir = IP_CT_DIR_ORIGINAL;
-
        /* both expectations are identical apart from tuple */
        memcpy(exp_reply, exp_orig, sizeof(*exp_reply));
        memcpy(&exp_reply->tuple, &exp_tuples[1], sizeof(exp_reply->tuple));
 
-       exp_reply->dir = !exp_orig->dir;
-
        if (ip_nat_pptp_hook_exp_gre)
                ret = ip_nat_pptp_hook_exp_gre(exp_orig, exp_reply);
        else {
@@ -340,7 +335,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);
@@ -485,7 +481,7 @@ pptp_inbound_pkt(struct sk_buff **pskb,
 
                if (info->pns_call_id != ntohs(*pcid)) {
                        DEBUGP("%s for unknown CallID %u\n", 
-                               pptp_msg_name[msg], ntohs(*cid));
+                               pptp_msg_name[msg], ntohs(*pcid));
                        break;
                }
 
@@ -551,7 +547,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 +752,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 },
@@ -765,7 +762,7 @@ static struct ip_conntrack_helper pptp = {
        .help = conntrack_pptp_help
 };
 
-extern void __exit ip_ct_proto_gre_fini(void);
+extern void ip_ct_proto_gre_fini(void);
 extern int __init ip_ct_proto_gre_init(void);
 
 /* ip_conntrack_pptp initialization */