Bug 15738

Summary: PPP and CallBack Control Protocol
Product: [Retired] Red Hat Linux Reporter: Gilberto Mardegan <info>
Component: pppAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: high    
Version: 7.1CC: aleksey, john_hull, michael_e_brown, nerijus, shishz, support
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-08-10 06:57:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gilberto Mardegan 2000-08-08 16:26:37 UTC
I try to connect to my ISP and the debug log of pppd tell me "unsupported
protocol 'Callback Control Protocol (CBCP)' (0xc029) received" and affer
appear "tcflush failed: invalid argument". 

I am using RH 6.0 with ppp-2.3.11-i386
Digicom SNT/06 TA ISDN on ttyS0
Intel Pentium II 233 based PC

Aug  8 18:01:05 linsrv pppd[1841]: pppd 2.3.11 started by root, uid 0
ago  8 18:01:05 linsrv ifup-ppp: pppd started for ppp0 on /dev/ttyS0 at
115200
Aug  8 18:01:06 linsrv chat[1843]: abort on (BUSY)
Aug  8 18:01:06 linsrv chat[1843]: abort on (ERROR)
Aug  8 18:01:06 linsrv chat[1843]: abort on (NO CARRIER)
Aug  8 18:01:06 linsrv chat[1843]: abort on (NO DIALTONE)
Aug  8 18:01:06 linsrv chat[1843]: abort on (Invalid Login)
Aug  8 18:01:06 linsrv chat[1843]: abort on (Login incorrect)
Aug  8 18:01:06 linsrv chat[1843]: send (ATZ^M)
Aug  8 18:01:06 linsrv chat[1843]: expect (OK)
Aug  8 18:01:06 linsrv chat[1843]: ATZ^M^M
Aug  8 18:01:06 linsrv chat[1843]: OK
Aug  8 18:01:06 linsrv chat[1843]:  -- got it 
Aug  8 18:01:06 linsrv chat[1843]: send (ATDT0423502040^M)
Aug  8 18:01:06 linsrv chat[1843]: expect (CONNECT)
Aug  8 18:01:06 linsrv chat[1843]: ^M
Aug  8 18:01:08 linsrv chat[1843]: ATDT0423502040^M^M
Aug  8 18:01:08 linsrv chat[1843]: CARRIER 64000^M
Aug  8 18:01:08 linsrv chat[1843]: ^M
Aug  8 18:01:08 linsrv chat[1843]: PROTOCOL: PPP^M
Aug  8 18:01:08 linsrv chat[1843]: ^M
Aug  8 18:01:08 linsrv chat[1843]: CONNECT
Aug  8 18:01:08 linsrv chat[1843]:  -- got it 
Aug  8 18:01:08 linsrv chat[1843]: send (^M)
Aug  8 18:01:08 linsrv chat[1843]: timeout set to 5 seconds
Aug  8 18:01:08 linsrv chat[1843]: expect (~)
Aug  8 18:01:08 linsrv chat[1843]:  115200^M
Aug  8 18:01:13 linsrv chat[1843]: alarm
Aug  8 18:01:13 linsrv chat[1843]: send (^M)
Aug  8 18:01:13 linsrv chat[1843]: send (^M)
Aug  8 18:01:13 linsrv pppd[1841]: Serial connection established.
Aug  8 18:01:13 linsrv pppd[1841]: Using interface ppp0
Aug  8 18:01:13 linsrv pppd[1841]: Connect: ppp0 <--> /dev/ttyS0
Aug  8 18:01:14 linsrv kernel: PPP BSD Compression module registered 
Aug  8 18:01:15 linsrv kernel: PPP Deflate Compression module registered 
Aug  8 18:01:15 linsrv pppd[1841]: Peer is not authorized to use remote
address 151.5.184.103
Aug  8 18:01:15 linsrv pppd[1841]: Unsupported protocol 'CallBack Control
Protocol (CBCP)' (0xc029) received
Aug  8 18:01:16 linsrv pppd[1841]: LCP terminated by peer
Aug  8 18:01:19 linsrv pppd[1841]: Connection terminated.
Aug  8 18:01:19 linsrv pppd[1841]: Connect time 0.1 minutes.
Aug  8 18:01:19 linsrv pppd[1841]: Sent 325 bytes, received 206 bytes.
Aug  8 18:01:19 linsrv pppd[1841]: tcflush failed: Invalid argument
Aug  8 18:01:20 linsrv pppd[1841]: Exit.

I hope that somebody can help me....

Comment 1 Michael E Brown 2001-06-05 18:10:28 UTC
This problem exists in PPP2.3.11, and PPP2.4.0+.
 
When pppd is compiled with "#define CBCP_SUPPORT YES", enabling the
Callback Control Protocol, the Link Control Protocol (LCP) issues
conflicting and erroneous packets. First, <callback CBCP> is sent in an
LCP request packet, and then <callback CBCP> is sent in an LCP reject
packet. This may be observed when connecting to a peer that supports
CBCP, such as Microsoft Windows. Although Windows peers essentially
ignore the LCP reject following the LCP request, other peers do not
ignore the reject and cancel CBCP.
 
SOLUTION
The function lcp_reqci() in lcp.c is missing a case in the switch
statement for CI_CALLBACK. The following code should be added:
 
        /*
         * Bug fix: This case was missing in PPP2.3.11.
         */
        case CI_CALLBACK:
            LCPDEBUG(("lcp_reqci: rcvd CALLBACK"));
            GETCHAR(cishort, p);
            LCPDEBUG(("(%d)", cishort));
#ifdef  CBCP_SUPPORT
            if (!ao->neg_cbcp ||
                    cishort != CBCP_OPT) {
                orc = CONFNAK;
                PUTCHAR(CI_CALLBACK, nakp);
                PUTCHAR(CILEN_CHAR, nakp);
                PUTCHAR(CBCP_OPT, nakp);
                break;
            }
            ho->neg_cbcp = 1;
#else
            orc = CONFREJ;
#endif
            break;
 
------------------------------------------------------------------------

Comment 2 Nalin Dahyabhai 2001-08-10 06:57:31 UTC
This patch will be folded into ppp-2.4.1-2 and later.  Thanks!

Comment 3 Need Real Name 2001-11-22 22:20:11 UTC
Unfortunately Brown's bug fix makes things worse, not better. The Linux pppd
does NOT support server CBCP. Ie, pppd SHOULD reject a ConfReq from the Windows
box, since that is a request that the Linux system act as a server, as I
understand it. Linux pppd cannot. 

This patch in fact has messed up a number of people who have set up as ppp
servers. The Win machine does a ConfReq for callback, Linux accepts. Then after
authentication, The win machine hangs up, as it is supposed to, waiting for the
callback. But Linux's acceptance was fake-- it had no intention of calling back,
and it then times out sending IPCP requests to the Win box.

Ie, this patch should be removed from the Redhat ppp.

Comment 4 Frank Ch. Eigler 2001-11-27 20:43:14 UTC
see also bug 55367