git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
net
/
ipv4
/
netfilter
/
ip_nat_helper_pptp.c
diff --git
a/net/ipv4/netfilter/ip_nat_helper_pptp.c
b/net/ipv4/netfilter/ip_nat_helper_pptp.c
index
f397772
..
ac00489
100644
(file)
--- a/
net/ipv4/netfilter/ip_nat_helper_pptp.c
+++ b/
net/ipv4/netfilter/ip_nat_helper_pptp.c
@@
-52,8
+52,6
@@
#define IP_NAT_PPTP_VERSION "3.0"
#define IP_NAT_PPTP_VERSION "3.0"
-#define REQ_CID(req, off) (*(u_int16_t *)((char *)(req) + (off)))
-
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Harald Welte <laforge@gnumonks.org>");
MODULE_DESCRIPTION("Netfilter NAT helper module for PPTP");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Harald Welte <laforge@gnumonks.org>");
MODULE_DESCRIPTION("Netfilter NAT helper module for PPTP");
@@
-200,7
+198,7
@@
pptp_outbound_pkt(struct sk_buff **pskb,
/* only OUT_CALL_REQUEST, IN_CALL_REPLY, CALL_CLEAR_REQUEST pass
* down to here */
DEBUGP("altering call id from 0x%04x to 0x%04x\n",
/* only OUT_CALL_REQUEST, IN_CALL_REPLY, CALL_CLEAR_REQUEST pass
* down to here */
DEBUGP("altering call id from 0x%04x to 0x%04x\n",
- ntohs(
REQ_CID(pptpReq, cid_off)
), ntohs(new_callid));
+ ntohs(
*(u_int16_t *)pptpReq + cid_off
), ntohs(new_callid));
/* mangle packet */
if (ip_nat_mangle_tcp_packet(pskb, ct, ctinfo,
/* mangle packet */
if (ip_nat_mangle_tcp_packet(pskb, ct, ctinfo,
@@
-344,7
+342,7
@@
pptp_inbound_pkt(struct sk_buff **pskb,
/* mangle packet */
DEBUGP("altering peer call id from 0x%04x to 0x%04x\n",
/* mangle packet */
DEBUGP("altering peer call id from 0x%04x to 0x%04x\n",
- ntohs(
REQ_CID(pptpReq, pcid_off)
), ntohs(new_pcid));
+ ntohs(
*(u_int16_t *)pptpReq + pcid_off
), ntohs(new_pcid));
if (ip_nat_mangle_tcp_packet(pskb, ct, ctinfo,
pcid_off + sizeof(struct pptp_pkt_hdr) +
if (ip_nat_mangle_tcp_packet(pskb, ct, ctinfo,
pcid_off + sizeof(struct pptp_pkt_hdr) +
@@
-355,7
+353,7
@@
pptp_inbound_pkt(struct sk_buff **pskb,
if (new_cid) {
DEBUGP("altering call id from 0x%04x to 0x%04x\n",
if (new_cid) {
DEBUGP("altering call id from 0x%04x to 0x%04x\n",
- ntohs(
REQ_CID(pptpReq, cid_off)
), ntohs(new_cid));
+ ntohs(
*(u_int16_t *)pptpReq + cid_off
), ntohs(new_cid));
if (ip_nat_mangle_tcp_packet(pskb, ct, ctinfo,
cid_off + sizeof(struct pptp_pkt_hdr) +
sizeof(struct PptpControlHeader),
if (ip_nat_mangle_tcp_packet(pskb, ct, ctinfo,
cid_off + sizeof(struct pptp_pkt_hdr) +
sizeof(struct PptpControlHeader),
@@
-370,7
+368,7
@@
pptp_inbound_pkt(struct sk_buff **pskb,
extern int __init ip_nat_proto_gre_init(void);
extern void __exit ip_nat_proto_gre_fini(void);
extern int __init ip_nat_proto_gre_init(void);
extern void __exit ip_nat_proto_gre_fini(void);
-static int __init i
p_nat_helper_pptp_i
nit(void)
+static int __init init(void)
{
int ret;
{
int ret;
@@
-396,7
+394,7
@@
static int __init ip_nat_helper_pptp_init(void)
return 0;
}
return 0;
}
-static void __exit
ip_nat_helper_pptp_
fini(void)
+static void __exit fini(void)
{
DEBUGP("cleanup_module\n" );
{
DEBUGP("cleanup_module\n" );
@@
-412,5
+410,5
@@
static void __exit ip_nat_helper_pptp_fini(void)
printk("ip_nat_pptp version %s unloaded\n", IP_NAT_PPTP_VERSION);
}
printk("ip_nat_pptp version %s unloaded\n", IP_NAT_PPTP_VERSION);
}
-module_init(i
p_nat_helper_pptp_i
nit);
-module_exit(
ip_nat_helper_pptp_
fini);
+module_init(init);
+module_exit(fini);