提交 6013c0a1 编写于 作者: P Patrick McHardy 提交者: David S. Miller

[NETFILTER]: PPTP conntrack: fix header definitions

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: NPatrick McHardy <kaber@trash.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5256f663
...@@ -107,8 +107,7 @@ struct PptpControlHeader { ...@@ -107,8 +107,7 @@ struct PptpControlHeader {
struct PptpStartSessionRequest { struct PptpStartSessionRequest {
__be16 protocolVersion; __be16 protocolVersion;
__u8 reserved1; __u16 reserved1;
__u8 reserved2;
__be32 framingCapability; __be32 framingCapability;
__be32 bearerCapability; __be32 bearerCapability;
__be16 maxChannels; __be16 maxChannels;
...@@ -143,6 +142,8 @@ struct PptpStartSessionReply { ...@@ -143,6 +142,8 @@ struct PptpStartSessionReply {
struct PptpStopSessionRequest { struct PptpStopSessionRequest {
__u8 reason; __u8 reason;
__u8 reserved1;
__u16 reserved2;
}; };
/* PptpStopSessionResultCode */ /* PptpStopSessionResultCode */
...@@ -152,6 +153,7 @@ struct PptpStopSessionRequest { ...@@ -152,6 +153,7 @@ struct PptpStopSessionRequest {
struct PptpStopSessionReply { struct PptpStopSessionReply {
__u8 resultCode; __u8 resultCode;
__u8 generalErrorCode; __u8 generalErrorCode;
__u16 reserved1;
}; };
struct PptpEchoRequest { struct PptpEchoRequest {
...@@ -188,9 +190,8 @@ struct PptpOutCallRequest { ...@@ -188,9 +190,8 @@ struct PptpOutCallRequest {
__be32 framingType; __be32 framingType;
__be16 packetWindow; __be16 packetWindow;
__be16 packetProcDelay; __be16 packetProcDelay;
__u16 reserved1;
__be16 phoneNumberLength; __be16 phoneNumberLength;
__u16 reserved2; __u16 reserved1;
__u8 phoneNumber[64]; __u8 phoneNumber[64];
__u8 subAddress[64]; __u8 subAddress[64];
}; };
......
...@@ -569,7 +569,7 @@ pptp_outbound_pkt(struct sk_buff **pskb, ...@@ -569,7 +569,7 @@ pptp_outbound_pkt(struct sk_buff **pskb,
case PPTP_OUT_CALL_REQUEST: case PPTP_OUT_CALL_REQUEST:
if (reqlen < sizeof(_pptpReq.ocreq)) { if (reqlen < sizeof(_pptpReq.ocreq)) {
DEBUGP("%s: short packet\n", pptp_msg_name[msg]); DEBUGP("%s: short packet\n", pptp_msg_name[msg]);
/* FIXME: break; */ break;
} }
/* client initiating connection to server */ /* client initiating connection to server */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册