Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22165
b: refs/heads/master
c: f2ad52c
h: refs/heads/master
i:
  22163: b0206b9
v: v3
  • Loading branch information
Holger Eitzenberger authored and David S. Miller committed Mar 21, 2006
1 parent bd1264e commit 3f32aec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 77ff72d528d5b9d30a47f42f364ba34d931f9da3
refs/heads/master: f2ad52c9da2229d7f038d02139d21478b33b76b4
8 changes: 5 additions & 3 deletions trunk/net/ipv4/netfilter/ip_nat_helper_pptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@

#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");
Expand Down Expand Up @@ -198,7 +200,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",
ntohs(*(u_int16_t *)pptpReq + cid_off), ntohs(new_callid));
ntohs(REQ_CID(pptpReq, cid_off)), ntohs(new_callid));

/* mangle packet */
if (ip_nat_mangle_tcp_packet(pskb, ct, ctinfo,
Expand Down Expand Up @@ -342,7 +344,7 @@ pptp_inbound_pkt(struct sk_buff **pskb,

/* mangle packet */
DEBUGP("altering peer call id from 0x%04x to 0x%04x\n",
ntohs(*(u_int16_t *)pptpReq + pcid_off), ntohs(new_pcid));
ntohs(REQ_CID(pptpReq, pcid_off)), ntohs(new_pcid));

if (ip_nat_mangle_tcp_packet(pskb, ct, ctinfo,
pcid_off + sizeof(struct pptp_pkt_hdr) +
Expand All @@ -353,7 +355,7 @@ pptp_inbound_pkt(struct sk_buff **pskb,

if (new_cid) {
DEBUGP("altering call id from 0x%04x to 0x%04x\n",
ntohs(*(u_int16_t *)pptpReq + cid_off), ntohs(new_cid));
ntohs(REQ_CID(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),
Expand Down

0 comments on commit 3f32aec

Please sign in to comment.