pppd-2.3 on FreeBSD

[ Nob's Home | FreeBSD | ppp ]

I can install pppd2.3 on FreeBSD 2.1 box
If you find any mistake, please mail to nob@makioka.y-min.or.jp.
  1. Get the latest version of pppd from
    ftp://cs.anu.edu.au/pub/software/ppp/
    I suppose that ppp-2.3b3.tar.gz is the new one.
    I reported some problems in ppp-2.3b2 , and these problems are solved in ppp-2.3b3.
    ( my contribution ? I want to think so ^_^)

  2. extract to /usr/local/src (anywhere you want)
    $ tar zxvf ppp-2.3b3.tar.gz -C /usr/local/src

  3. ./configure
    $ cd /us/local/src/ppp-2.3b3
    $ ./configure
    
  4. make
    ===> chat
    cc -O   -c chat.c
    cc -O    -o chat chat.o
    ===> pppd
    cc -O -g -I.. -DHAVE_PATHS_H -D_BITYPES   -c main.c
    cc -O -g -I.. -DHAVE_PATHS_H -D_BITYPES   -c magic.c
    cc -O -g -I.. -DHAVE_PATHS_H -D_BITYPES   -c fsm.c
    cc -O -g -I.. -DHAVE_PATHS_H -D_BITYPES   -c lcp.c
    cc -O -g -I.. -DHAVE_PATHS_H -D_BITYPES   -c ipcp.c
    cc -O -g -I.. -DHAVE_PATHS_H -D_BITYPES   -c upap.c
    cc -O -g -I.. -DHAVE_PATHS_H -D_BITYPES   -c chap.c
    cc -O -g -I.. -DHAVE_PATHS_H -D_BITYPES   -c md5.c
    cc -O -g -I.. -DHAVE_PATHS_H -D_BITYPES   -c ccp.c
    cc -O -g -I.. -DHAVE_PATHS_H -D_BITYPES   -c demand.c
    cc -O -g -I.. -DHAVE_PATHS_H -D_BITYPES   -c auth.c
    cc -O -g -I.. -DHAVE_PATHS_H -D_BITYPES   -c options.c
    cc -O -g -I.. -DHAVE_PATHS_H -D_BITYPES   -c sys-bsd.c
    cc -O -g -I.. -DHAVE_PATHS_H -D_BITYPES    -o pppd main.o magic.o fsm.o lcp.o ip
    cp.o upap.o chap.o md5.o ccp.o demand.o auth.o options.o sys-bsd.o  -lcrypt -lut
    il
    ===> pppstats
    cc -O -I.. -D_BITYPES   -c pppstats.c
    cc -O -I.. -D_BITYPES    -o pppstats pppstats.o
    
    Congulaturation!! No error!

  5. make install
    ===> chat
    install -c -s -o bin -g bin -m 555   chat /usr/sbin
    (cd /usr/local/src/ppp-2.3b3/chat; install  -c -o bin -g bin -m 444 chat.8 /usr/
    share/man/man8)
    compressing in /usr/share/man/man8: chat.8 -> chat.8.gz
    ===> pppd
    install -c -s -o root -g bin -m 4555   pppd /usr/sbin
    (cd /usr/local/src/ppp-2.3b3/pppd; install  -c -o bin -g bin -m 444 pppd.8 /usr/
    share/man/man8)
    compressing in /usr/share/man/man8: pppd.8 -> pppd.8.gz
    ===> pppstats
    install -c -s -o bin -g bin -m 555   pppstats /usr/sbin
    (cd /usr/local/src/ppp-2.3b3/pppstats; install  -c -o bin -g bin -m 444 pppstats
    .8 /usr/share/man/man8)
    compressing in /usr/share/man/man8: pppstats.8 -> pppstats.8.gz
    
    Now, "man" is installed to right directory.

  6. make kernel

    # make kernel
    
    Some files are copied to /sys/net/, and /sys/conf/files is patched

    *** Attension!! ***
    If you already installed ppp-2.2, "make kernel" will miss the patch to /sys/conf/files
    In this case, you need to add these lines manually

    net/ppp-deflate.c     optional ppp
    net/zlib.c            optional ppp
    

  7. kernel recompile
    # cd /usr/src/sys/i386/conf
    # config MAKIOKA (change MAKIOKA to your config file name)
    # cd /usr/src/compile/MAKIOKA (change MAKIOKA to your config file name)
    # make depend
    # make
    
    In pppd-2.3b3, modification of /sys/net/if_ppp.c and /sys/net/if_pppvar.h is not needed.
    But "inflate" problem is not solved completely,
    loading kernel
    inflate.o: Definition of symbol `_inflate' (multiply defined)
    zlib.o: Definition of symbol `_inflate' (multiply defined)
    *** Error code 1
    
    Stop.
    
    In /sys/net/zlib.c and /sys/net/ppp-deflate.c, inflate() is used.
    In these sources, you can find
    #ifdef FreeBSD
    #define inflate inflate_ppp     /* FreeBSD already has an inflate :-( */
    #endif
    
    but FreeBSD is not used in Makefile.
    So, add -DFreeBSD to IDENT= of Makefile.

  8. make again

    then you can get new kernel.

  9. make install
    # make install
    chflags noschg /kernel
    mv /kernel /kernel.old
    install -c -m 555 -o root -g wheel -fschg kernel /
    
    You must reboot.Then you can use new pppd.
    Check the version's of pppd,
    # pppd -v (or -h)
    pppd: unrecognized option '-v'
    pppd version 2.3 patch level 0beta3
    

  10. zombie route problem in using pppd

    Using pppd with proxyarp makes "zombie" route, when the remote site is hanged up.
    You can see this problem in ftp session.
    Duaring ftp session over ppp connection,
    if the modem is hanged up or send kill -HUP to pppd,
    then "zombie route" will be appered.
    (Thanks for this info to Mr. Kanehara (kanehara@parker.tpk.toppan.co.jp) )

    This problem is not for pppd but for kernel.

    I asked this problem to "FreeBSD-users-jp mailing list",
    then Mr. annonymous teached me that,

    This phenomenon is supposed to be a BUG of kernel in the 2.1R (or eralier) .
    In freebsd-questions ML, accoding to the mail of Mr. Jay L. West(jlwest@tseinc.com),
    vesion up the /sys/netinet/in_rmx.c to the stable vesion, then you should remake kernel

    I got /usr/src/sys/netinet/in_rmx.c in FreeBSD-stable.
    The version is 1.13.4.3 .
    (original version in 2.1R is 1.13.4.1)
    Replace the in_rmx.c to new one, then you should make kernel again.

    Even after rebooting, "zombie route" will appear.
    But, in next ppp connection, this "zombie route" is lost and
    not make "Address already exists" message and you can use normally.

    This bug is corrected in FreeBSD 2.1.5R or later.


[ Nob's Home | FreeBSD | ppp ]
nob@makioka.y-min.or.jp