Skip to content

Commit

Permalink
[NETFILTER]: PPTP conntrack: fix header definitions
Browse files Browse the repository at this point in the history
Fix a few header definitions to match RFC2637. Most importantly the
PptpOutCallRequest header included an invalid padding field and a
size check was disabled because of this.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Sep 22, 2006
1 parent 5256f66 commit 6013c0a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions include/linux/netfilter_ipv4/ip_conntrack_pptp.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ struct PptpControlHeader {

struct PptpStartSessionRequest {
__be16 protocolVersion;
__u8 reserved1;
__u8 reserved2;
__u16 reserved1;
__be32 framingCapability;
__be32 bearerCapability;
__be16 maxChannels;
Expand Down Expand Up @@ -143,6 +142,8 @@ struct PptpStartSessionReply {

struct PptpStopSessionRequest {
__u8 reason;
__u8 reserved1;
__u16 reserved2;
};

/* PptpStopSessionResultCode */
Expand All @@ -152,6 +153,7 @@ struct PptpStopSessionRequest {
struct PptpStopSessionReply {
__u8 resultCode;
__u8 generalErrorCode;
__u16 reserved1;
};

struct PptpEchoRequest {
Expand Down Expand Up @@ -188,9 +190,8 @@ struct PptpOutCallRequest {
__be32 framingType;
__be16 packetWindow;
__be16 packetProcDelay;
__u16 reserved1;
__be16 phoneNumberLength;
__u16 reserved2;
__u16 reserved1;
__u8 phoneNumber[64];
__u8 subAddress[64];
};
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ip_conntrack_helper_pptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ pptp_outbound_pkt(struct sk_buff **pskb,
case PPTP_OUT_CALL_REQUEST:
if (reqlen < sizeof(_pptpReq.ocreq)) {
DEBUGP("%s: short packet\n", pptp_msg_name[msg]);
/* FIXME: break; */
break;
}

/* client initiating connection to server */
Expand Down

0 comments on commit 6013c0a

Please sign in to comment.