diff options
author | Patrick McHardy <kaber@trash.net> | 2006-09-20 15:08:23 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 18:20:09 -0400 |
commit | a1ad1deed5bf6fa06f2213b7f1a794de4cf791a6 (patch) | |
tree | 5f5895cdb3f19f9137b644f684bb7bc1cb138345 /net | |
parent | 955b944293dd4c931ec866ebe19a6b2463b8f9a0 (diff) |
[NETFILTER]: PPTP conntrack: remove dead code
The call ID in reply packets is never changed, remove the code.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/netfilter/ip_nat_helper_pptp.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/net/ipv4/netfilter/ip_nat_helper_pptp.c b/net/ipv4/netfilter/ip_nat_helper_pptp.c index 6e8bd6b3431f..0f5e753b481d 100644 --- a/net/ipv4/netfilter/ip_nat_helper_pptp.c +++ b/net/ipv4/netfilter/ip_nat_helper_pptp.c | |||
@@ -296,16 +296,15 @@ pptp_inbound_pkt(struct sk_buff **pskb, | |||
296 | union pptp_ctrl_union *pptpReq) | 296 | union pptp_ctrl_union *pptpReq) |
297 | { | 297 | { |
298 | struct ip_nat_pptp *nat_pptp_info = &ct->nat.help.nat_pptp_info; | 298 | struct ip_nat_pptp *nat_pptp_info = &ct->nat.help.nat_pptp_info; |
299 | u_int16_t msg, new_cid = 0; | 299 | u_int16_t msg; |
300 | __be16 new_pcid; | 300 | __be16 new_pcid; |
301 | unsigned int pcid_off, cid_off = 0; | 301 | unsigned int pcid_off; |
302 | 302 | ||
303 | new_pcid = nat_pptp_info->pns_call_id; | 303 | new_pcid = nat_pptp_info->pns_call_id; |
304 | 304 | ||
305 | switch (msg = ntohs(ctlh->messageType)) { | 305 | switch (msg = ntohs(ctlh->messageType)) { |
306 | case PPTP_OUT_CALL_REPLY: | 306 | case PPTP_OUT_CALL_REPLY: |
307 | pcid_off = offsetof(union pptp_ctrl_union, ocack.peersCallID); | 307 | pcid_off = offsetof(union pptp_ctrl_union, ocack.peersCallID); |
308 | cid_off = offsetof(union pptp_ctrl_union, ocack.callID); | ||
309 | break; | 308 | break; |
310 | case PPTP_IN_CALL_CONNECT: | 309 | case PPTP_IN_CALL_CONNECT: |
311 | pcid_off = offsetof(union pptp_ctrl_union, iccon.peersCallID); | 310 | pcid_off = offsetof(union pptp_ctrl_union, iccon.peersCallID); |
@@ -351,17 +350,6 @@ pptp_inbound_pkt(struct sk_buff **pskb, | |||
351 | sizeof(new_pcid), (char *)&new_pcid, | 350 | sizeof(new_pcid), (char *)&new_pcid, |
352 | sizeof(new_pcid)) == 0) | 351 | sizeof(new_pcid)) == 0) |
353 | return NF_DROP; | 352 | return NF_DROP; |
354 | |||
355 | if (new_cid) { | ||
356 | DEBUGP("altering call id from 0x%04x to 0x%04x\n", | ||
357 | ntohs(REQ_CID(pptpReq, cid_off)), ntohs(new_cid)); | ||
358 | if (ip_nat_mangle_tcp_packet(pskb, ct, ctinfo, | ||
359 | cid_off + sizeof(struct pptp_pkt_hdr) + | ||
360 | sizeof(struct PptpControlHeader), | ||
361 | sizeof(new_cid), (char *)&new_cid, | ||
362 | sizeof(new_cid)) == 0) | ||
363 | return NF_DROP; | ||
364 | } | ||
365 | return NF_ACCEPT; | 353 | return NF_ACCEPT; |
366 | } | 354 | } |
367 | 355 | ||