aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2006-09-20 15:09:19 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-22 18:20:12 -0400
commit857c06da2ba2e00b81677c2f6740048d87da0207 (patch)
tree234bfa8f2ce443606ad7f5f4e3989e4b25a5db98 /net
parent6013c0a13e335674a783215e182c367406294392 (diff)
[NETFILTER]: PPTP conntrack: remove unnecessary cid/pcid header pointers
Just the values are needed, not the memory locations. 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_conntrack_helper_pptp.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_pptp.c b/net/ipv4/netfilter/ip_conntrack_helper_pptp.c
index 1a8da9015d8c..5f7af6ef3881 100644
--- a/net/ipv4/netfilter/ip_conntrack_helper_pptp.c
+++ b/net/ipv4/netfilter/ip_conntrack_helper_pptp.c
@@ -334,7 +334,7 @@ pptp_inbound_pkt(struct sk_buff **pskb,
334 union pptp_ctrl_union _pptpReq, *pptpReq; 334 union pptp_ctrl_union _pptpReq, *pptpReq;
335 struct ip_ct_pptp_master *info = &ct->help.ct_pptp_info; 335 struct ip_ct_pptp_master *info = &ct->help.ct_pptp_info;
336 u_int16_t msg; 336 u_int16_t msg;
337 __be16 *cid, *pcid; 337 __be16 cid, pcid;
338 338
339 ctlh = skb_header_pointer(*pskb, nexthdr_off, sizeof(_ctlh), &_ctlh); 339 ctlh = skb_header_pointer(*pskb, nexthdr_off, sizeof(_ctlh), &_ctlh);
340 if (!ctlh) { 340 if (!ctlh) {
@@ -414,23 +414,23 @@ pptp_inbound_pkt(struct sk_buff **pskb,
414 break; 414 break;
415 } 415 }
416 416
417 cid = &pptpReq->ocack.callID; 417 cid = pptpReq->ocack.callID;
418 pcid = &pptpReq->ocack.peersCallID; 418 pcid = pptpReq->ocack.peersCallID;
419 419
420 info->pac_call_id = *cid; 420 info->pac_call_id = cid;
421 421
422 if (info->pns_call_id != *pcid) { 422 if (info->pns_call_id != pcid) {
423 DEBUGP("%s for unknown callid %u\n", 423 DEBUGP("%s for unknown callid %u\n",
424 pptp_msg_name[msg], ntohs(*pcid)); 424 pptp_msg_name[msg], ntohs(pcid));
425 break; 425 break;
426 } 426 }
427 427
428 DEBUGP("%s, CID=%X, PCID=%X\n", pptp_msg_name[msg], 428 DEBUGP("%s, CID=%X, PCID=%X\n", pptp_msg_name[msg],
429 ntohs(*cid), ntohs(*pcid)); 429 ntohs(cid), ntohs(pcid));
430 430
431 info->cstate = PPTP_CALL_OUT_CONF; 431 info->cstate = PPTP_CALL_OUT_CONF;
432 432
433 exp_gre(ct, *cid, *pcid); 433 exp_gre(ct, cid, pcid);
434 break; 434 break;
435 435
436 case PPTP_IN_CALL_REQUEST: 436 case PPTP_IN_CALL_REQUEST:
@@ -444,10 +444,10 @@ pptp_inbound_pkt(struct sk_buff **pskb,
444 DEBUGP("%s but no session\n", pptp_msg_name[msg]); 444 DEBUGP("%s but no session\n", pptp_msg_name[msg]);
445 break; 445 break;
446 } 446 }
447 pcid = &pptpReq->icack.peersCallID; 447 pcid = pptpReq->icack.peersCallID;
448 DEBUGP("%s, PCID=%X\n", pptp_msg_name[msg], ntohs(*pcid)); 448 DEBUGP("%s, PCID=%X\n", pptp_msg_name[msg], ntohs(pcid));
449 info->cstate = PPTP_CALL_IN_REQ; 449 info->cstate = PPTP_CALL_IN_REQ;
450 info->pac_call_id = *pcid; 450 info->pac_call_id = pcid;
451 break; 451 break;
452 452
453 case PPTP_IN_CALL_CONNECT: 453 case PPTP_IN_CALL_CONNECT:
@@ -468,20 +468,20 @@ pptp_inbound_pkt(struct sk_buff **pskb,
468 break; 468 break;
469 } 469 }
470 470
471 pcid = &pptpReq->iccon.peersCallID; 471 pcid = pptpReq->iccon.peersCallID;
472 cid = &info->pac_call_id; 472 cid = info->pac_call_id;
473 473
474 if (info->pns_call_id != *pcid) { 474 if (info->pns_call_id != pcid) {
475 DEBUGP("%s for unknown CallID %u\n", 475 DEBUGP("%s for unknown CallID %u\n",
476 pptp_msg_name[msg], ntohs(*pcid)); 476 pptp_msg_name[msg], ntohs(pcid));
477 break; 477 break;
478 } 478 }
479 479
480 DEBUGP("%s, PCID=%X\n", pptp_msg_name[msg], ntohs(*pcid)); 480 DEBUGP("%s, PCID=%X\n", pptp_msg_name[msg], ntohs(pcid));
481 info->cstate = PPTP_CALL_IN_CONF; 481 info->cstate = PPTP_CALL_IN_CONF;
482 482
483 /* we expect a GRE connection from PAC to PNS */ 483 /* we expect a GRE connection from PAC to PNS */
484 exp_gre(ct, *cid, *pcid); 484 exp_gre(ct, cid, pcid);
485 break; 485 break;
486 486
487 case PPTP_CALL_DISCONNECT_NOTIFY: 487 case PPTP_CALL_DISCONNECT_NOTIFY:
@@ -491,8 +491,8 @@ pptp_inbound_pkt(struct sk_buff **pskb,
491 } 491 }
492 492
493 /* server confirms disconnect */ 493 /* server confirms disconnect */
494 cid = &pptpReq->disc.callID; 494 cid = pptpReq->disc.callID;
495 DEBUGP("%s, CID=%X\n", pptp_msg_name[msg], ntohs(*cid)); 495 DEBUGP("%s, CID=%X\n", pptp_msg_name[msg], ntohs(cid));
496 info->cstate = PPTP_CALL_NONE; 496 info->cstate = PPTP_CALL_NONE;
497 497
498 /* untrack this call id, unexpect GRE packets */ 498 /* untrack this call id, unexpect GRE packets */
@@ -534,7 +534,7 @@ pptp_outbound_pkt(struct sk_buff **pskb,
534 union pptp_ctrl_union _pptpReq, *pptpReq; 534 union pptp_ctrl_union _pptpReq, *pptpReq;
535 struct ip_ct_pptp_master *info = &ct->help.ct_pptp_info; 535 struct ip_ct_pptp_master *info = &ct->help.ct_pptp_info;
536 u_int16_t msg; 536 u_int16_t msg;
537 __be16 *cid, *pcid; 537 __be16 cid, pcid;
538 538
539 ctlh = skb_header_pointer(*pskb, nexthdr_off, sizeof(_ctlh), &_ctlh); 539 ctlh = skb_header_pointer(*pskb, nexthdr_off, sizeof(_ctlh), &_ctlh);
540 if (!ctlh) 540 if (!ctlh)
@@ -580,9 +580,9 @@ pptp_outbound_pkt(struct sk_buff **pskb,
580 } 580 }
581 info->cstate = PPTP_CALL_OUT_REQ; 581 info->cstate = PPTP_CALL_OUT_REQ;
582 /* track PNS call id */ 582 /* track PNS call id */
583 cid = &pptpReq->ocreq.callID; 583 cid = pptpReq->ocreq.callID;
584 DEBUGP("%s, CID=%X\n", pptp_msg_name[msg], ntohs(*cid)); 584 DEBUGP("%s, CID=%X\n", pptp_msg_name[msg], ntohs(cid));
585 info->pns_call_id = *cid; 585 info->pns_call_id = cid;
586 break; 586 break;
587 case PPTP_IN_CALL_REPLY: 587 case PPTP_IN_CALL_REPLY:
588 if (reqlen < sizeof(_pptpReq.icack)) { 588 if (reqlen < sizeof(_pptpReq.icack)) {
@@ -601,16 +601,16 @@ pptp_outbound_pkt(struct sk_buff **pskb,
601 info->cstate = PPTP_CALL_NONE; 601 info->cstate = PPTP_CALL_NONE;
602 break; 602 break;
603 } 603 }
604 pcid = &pptpReq->icack.peersCallID; 604 pcid = pptpReq->icack.peersCallID;
605 if (info->pac_call_id != *pcid) { 605 if (info->pac_call_id != pcid) {
606 DEBUGP("%s for unknown call %u\n", 606 DEBUGP("%s for unknown call %u\n",
607 pptp_msg_name[msg], ntohs(*pcid)); 607 pptp_msg_name[msg], ntohs(pcid));
608 break; 608 break;
609 } 609 }
610 DEBUGP("%s, CID=%X\n", pptp_msg_name[msg], ntohs(*pcid)); 610 DEBUGP("%s, CID=%X\n", pptp_msg_name[msg], ntohs(pcid));
611 /* part two of the three-way handshake */ 611 /* part two of the three-way handshake */
612 info->cstate = PPTP_CALL_IN_REP; 612 info->cstate = PPTP_CALL_IN_REP;
613 info->pns_call_id = pptpReq->icack.callID; 613 info->pns_call_id = pcid;
614 break; 614 break;
615 615
616 case PPTP_CALL_CLEAR_REQUEST: 616 case PPTP_CALL_CLEAR_REQUEST: