From owner-freebsd-net@FreeBSD.ORG Sun Dec 17 02:24:36 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2AB6D16A407 for ; Sun, 17 Dec 2006 02:24:36 +0000 (UTC) (envelope-from mav@alkar.net) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C3DB43CA5 for ; Sun, 17 Dec 2006 02:24:34 +0000 (GMT) (envelope-from mav@alkar.net) Received: from [195.248.178.122] (account mav@alkar.net HELO [192.168.3.2]) by cmail.optima.ua (CommuniGate Pro SMTP 5.0.11) with ESMTPA id 19060472; Sun, 17 Dec 2006 04:24:34 +0200 Message-ID: <4584AA60.5070207@alkar.net> Date: Sun, 17 Dec 2006 04:24:32 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.13) Gecko/20060414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: brian@Awfulhak.org, freebsd-net@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: ppp have bug in CCP negotiation? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Dec 2006 02:24:36 -0000 Hi. While debugging ccp support in mpd I have found strange behaviour in ppp daemon. In rfc1962 written: Configuration Options, in this protocol, indicate algorithms that the receiver is willing or able to use to decompress data sent by the sender. But when ppp negotiates different compression methods on different sides it behaves strictly in opposite way. It uses for decompression method which was requested in ConfigRequest by other side. Here is mpd logs. It negotiated pred1 for compress and mppc for decompress (it is stupid, but possible): [b2] CCP: SendConfigReq #1 MPPC 0x010000e0:MPPE(40, 56, 128 bits), stateless PRED1 [b2] CCP: rec'd Configure Request #7 link 0 (Req-Sent) DEFLATE Not supported PRED1 MPPC 0x000000e0:MPPE(40, 56, 128 bits), [b2] CCP: SendConfigRej #7 DEFLATE MPPC 0x000000e0:MPPE(40, 56, 128 bits), [b2] CCP: rec'd Configure Reject #2 link 0 (Ack-Sent) PRED1 [b2] CCP: SendConfigReq #3 MPPC 0x01000040:MPPE(128 bits), stateless [b2] CCP: rec'd Configure Ack #3 link 0 (Ack-Sent) MPPC 0x01000040:MPPE(128 bits), stateless [b2] CCP: LayerUp Compress using: pred1 () Decompress using: mppc (MPPE(128 bits), stateless) Here is ppp output: PPP ON fish> show ccp deflink: CCP [Opened] My protocol = PRED1, His protocol = MPPE Output: 0 --> 0, Input: 0 --> 0 Input Options: value 0x01000040 (128 bits, stateless) Output Options: (null) When I am trying to send packets from mpd side to ppp side, ppp writes: Error: MPPE: Input: Invalid packet (flags = 0x8000) Error: MPPE: Input: Invalid packet (flags = 0x8000) Error: MPPE: Input: Invalid packet (flags = 0x8000) Error: MPPE: Input: Invalid packet (flags = 0x8000) Error: MPPE: Input: Invalid packet (flags = 0x8000) -- Alexander Motin mav@alkar.net