Compiling pppd with cbcp (was Re: can't compile pppd)

Compiling pppd with cbcp (was Re: can't compile pppd)

Post by Graham » Mon, 30 Mar 1998 04:00:00




> >I'm trying to setup pppd-2.2.0g on my home Linux box...
> Go to 2.3.3.

Good idea - I've now done that. Infact I've even re-installed the whole
OS too, so its now at RH 5.0.

Quote:> Is there some reason you can't use the RPM?

Well, no. I didn't realise there was a version of 2.2.0g with MSCHAP
compiled into it at the time. Anyway, the current situation is like
this;

I've got ppp-2.3.3 (both src and binary RPMs). I've made the assumption
that MSCHAP and call back aren't compiled in by default, and have tried
compiling my own version. The README.MSCHAP80 and README.cbcp files are
very straightforward, and I compiled pppd with MSCHAP support without a
hitch.

As for the callback, when I patch the ./pppd/Makefile.linux file
according to the instructions, I get success almost all the way there,
and then;

--cut--
cc -O2  -D_linux_=1 -DHAVE_PATHS_H -DIPX_CHANGE -DCBCP_SUPPORT
-DCHAPMS=1 -DUSE_CRYPT=1   -c cbcp.c -o cbcp.o
cbcp.c:50: `PPP_CBCP' undeclared here (not in a function)
cbcp.c:50: initializer element for `cbcp_protent.protocol' is not
constant
cbcp.c: In function `cbcp_send':
cbcp.c:380: `PPP_CBCP' undeclared (first use this function)
cbcp.c:380: (Each undeclared identifier is reported only once
cbcp.c:380: for each function it appears in.)
make: *** [cbcp.o] Error 1
--cut--

When I read the patch that is supposed to update the Makefile to enable
call back, I noticed that the Makefile appears to have changed slightly
since the patch was built (a couple of line numbers are out of sync).

I've never applied a patch before, so I decided to just edit the
Makefile myself. There are only two changes to be made, so I'm confident
I didn't make a balls of it.

I think that the patch was made at version 2.3.0, and I'm trying to
apply it to 2.3.3. I may be talking out of my backside though.
Suggestions, anybody? Please... I'm getting seriously frustrated by this
now, and refuse to revert to Win95. I shan't, I shan't, I shan't....

An easy question - does the binary RPM available from Red Hat's contrib
directory at their ftp site support dial back and MSCHAP by default? I
havn't even considered this possibility, and will be as sick as a pig
(and rather relieved) if it does...

Quote:> And is your kernel compiled with PPP support?

Yes, Red Hat defaults to PPP support via a module. Allegedly.

Thanks for the info.

--
Graham

 
 
 

Compiling pppd with cbcp (was Re: can't compile pppd)

Post by bill davids » Wed, 01 Apr 1998 04:00:00




| As for the callback, when I patch the ./pppd/Makefile.linux file
| according to the instructions, I get success almost all the way there,
| and then;

You should have done 'make kernel' and built a kernel (with PPP
support, obviously). Then patch:
  patch -p0 < README.cbcp
          ^ may be '1' read the file!
and
  make clean
  make CHAPMS=1 USE_CRYPT=1
  make install

Sad note, I can get 2.3.3 to initiate a callback, and RAS calls back
like a charm, but 2.3.3 will never build a session as a server
accpting a callback. My solution is to use  an older version of pppd
for the answering connection, which is ugly but works every time.

Like:
  ppp-2.3.3 file /etc/ppp/RAS_callback -detach
  ppp-2.3.1pat file /etc/ppp/RAS_cb_answer

Note the 2nd script is allowed to detach, if the callback fails the
connect script will die with a timeout and the background daemon
will go away after one minute.

I've posted the scripts before, I'm planning to put them up on a web
site when I get time.
--

    CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.

 
 
 

Compiling pppd with cbcp (was Re: can't compile pppd)

Post by bill davids » Tue, 14 Apr 1998 04:00:00




| >
| > You should have done 'make kernel' and built a kernel (with PPP
| > support, obviously).
|
| But I have one already - don't I? The default RH5.0 one uses modules and
| kerneld to get round it. I like that approach.

If you do "make kernel" for the ppp source directory and it replaces
anything, you have to recompile the kernel and install it. I've
never tried ppp as a module, but lots of people run it that way, so
it should work.

| > My solution is to use  an older version of pppd
| > for the answering connection, which is ugly but works every time.
|
| This is getting complex!

Yes, I spent some time over the weekend trying to find out why
pppd-2.3.[34] will not connect when the callback come in. I posted
asking if anyone was able to get them working in server mode, and
there were no responses, so I suspect there's a problem there.

| > I've posted the scripts before, I'm planning to put them up on a web
| > site when I get time.
|
| I've found them with DejaNews, ta. I'll have another go at this when I get my
| box back (I've had to use it as a stand in for a server that fell over during
| a lightning strike, so there's no dial-in for me for a couple of weeks anyway
| ;)

Been there, done that. Hope you're being compensated for the loan,
either in cash or brownie points.
--

 "If I were a diplomat, in the best case I'd go hungry.  In the worst
  case, people would die."
                -- Robert Lipe

 
 
 

Compiling pppd with cbcp (was Re: can't compile pppd)

Post by Steve Harr » Wed, 15 Apr 1998 04:00:00



Quote:

> Yes, I spent some time over the weekend trying to find out why
> pppd-2.3.[34] will not connect when the callback come in. I posted
> asking if anyone was able to get them working in server mode, and
> there were no responses, so I suspect there's a problem there.

Replace the following line in function lcp_lowerup in pppd/lcp.c, and
recompile pppd :

    ppp_recv_config(unit, PPP_MRU, 0xffffffff,
                    wo->neg_pcompression, wo->neg_accompression);

with :

    ppp_recv_config(unit, PPP_MRU, 0x00000000,
                    wo->neg_pcompression, wo->neg_accompression);

its line 269 in 2.3.4. Works for me :-)

Steve

_____________________________________________________________________

   Computer Officer               |   Tel   : +44 (0)113 233 5451
   School of Computer Studies     |   Fax   : +44 (0)113 233 5468
   University of Leeds            |
   LEEDS                          |   ` Now on the count of three
   England                        |     all click on the Open File
   LS2 9JT                        |     icon, 1... 2... 3.... '
_____________________________________________________________________

 
 
 

1. pppd - need help compiling pppd 2.2.0f

I've got pppd 2.2.0f and I can't compile it. So the question is what
version of gcc/cpp should I use? Maybe I have an old one (2.7.0). Kernel
2.0.3. Following is what I usually get compiling pppd:

In file included from main.c:43:
pppd.h:69: parse error before `netmask'
pppd.h:114: parse error before `GetMask'
In file included from main.c:44:
magic.h:23: parse error before `magic'
In file included from main.c:46:
lcp.h:58: parse error before `u_int32_t'
lcp.h:61: parse error before `lqr_period'
lcp.h:65: parse error before `lcp_wantoptions'
lcp.h:66: parse error before `lcp_gotoptions'
lcp.h:67: parse error before `lcp_allowoptions'
lcp.h:68: parse error before `lcp_hisoptions'
lcp.h:69: parse error before `xmit_accm'
In file included from main.c:47:
ipcp.h:55: parse error before `u_int32_t'
ipcp.h:62: parse error before `ipcp_wantoptions'
ipcp.h:63: parse error before `ipcp_gotoptions'
ipcp.h:64: parse error before `ipcp_allowoptions'
ipcp.h:65: parse error before `ipcp_hisoptions'
make[1]: *** [main.o] Error 1
make[1]: Leaving directory `/home/alex/ppp/pppd/ppp-2.2.0f/pppd'
make: *** [all] Error 2

Any help would be _very_ appreciated.

Alex

2. Kernel compilation

3. PPP 2.3.1 won't compile with CBCP

4. Port seems to be blocked

5. Can't compile pppd 2.3.9

6. Tracing a library symbol back to source code line.

7. Can't compile pppd

8. Secure server on Apache 1.3

9. pppd won't compile :-((

10. pppd 2.2.0e won't compile

11. pppd cbcp 2.4.0 + kernel 2.4.32

12. pppd 2.3.9 won't compile

13. pppd with mschap80 and cbcp support.