WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: xl2tpd compilation problem  (Read 2332 times)

Offline qingquan

  • Newbie
  • *
  • Posts: 35
xl2tpd compilation problem
« on: December 24, 2022, 06:16:57 PM »
I need to use xl2tpd on tinycore, I can't find it in the software repository,
so I have to try to compile it. Here are my steps:


 tce-load -iw compiletc.tcz
 tce-load -iw libpcap-dev.tcz

wget https://github.com/xelerance/xl2tpd/archive/refs/tags/v1.3.18.tar.gz

tar -xvf v1.3.18.tar.gz

cd xl2tpd-1.3.18

make

Finished smoothly, no error, what should I do next to get xl2tpd running thank you。

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: xl2tpd compilation problem
« Reply #1 on: December 25, 2022, 02:32:10 AM »
You would package it as a tcz extension, then run it according to its instructions. The book (link on the front page) contains an example of making a tcz.
The only barriers that can stop you are the ones you create yourself.

Offline gadget42

  • Hero Member
  • *****
  • Posts: 787
Re: xl2tpd compilation problem
« Reply #2 on: December 25, 2022, 06:41:10 AM »
for any future searcher(s) of xl2tpd, here is a quoted snippet from the readme at:
https://github.com/xelerance/xl2tpd
Quote
NOTE: In Linux kernel 4.15+ there is a kernel bug with ancillary IP_PKTINFO. As such, for Linux kernel 4.15+ we recommend the community use xl2tpd 1.3.12+
The fluctuation theorem has long been known for a sudden switch of the Hamiltonian of a classical system Z54 . For a quantum system with a Hamiltonian changing from... https://forum.tinycorelinux.net/index.php/topic,25972.msg166580.html#msg166580

Offline qingquan

  • Newbie
  • *
  • Posts: 35
Re: xl2tpd compilation problem
« Reply #3 on: December 26, 2022, 03:59:57 AM »
Thanks for curaga and gadget42's reply. I have found a lot of posts,
 but unfortunately I have not found complete examples,
which makes my following work in trouble.
 Can anyone provide a complete tutorial or link?
Search keywords are good too, thanks.
Maybe I'm not qualified for this job?
 But I need the xl2tpd client and hope someone can help me,
 I see a lot of discussion on the forum about l2tp,
it seems to have no results.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14812
Re: xl2tpd compilation problem
« Reply #4 on: December 26, 2022, 04:43:34 AM »
Did you check the extension making section of the wiki?

Offline qingquan

  • Newbie
  • *
  • Posts: 35
Re: xl2tpd compilation problem
« Reply #5 on: December 29, 2022, 02:13:36 AM »
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@forum.tinycorelinux.net to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Offline qingquan

  • Newbie
  • *
  • Posts: 35
Re: xl2tpd compilation problem
« Reply #6 on: December 29, 2022, 02:23:00 AM »
Oh, the forum is finally ready to reply!

It still doesn't seem to be Posting, and sending the command line is an error.

Offline qingquan

  • Newbie
  • *
  • Posts: 35
Re: xl2tpd compilation problem
« Reply #7 on: December 29, 2022, 02:38:51 AM »
Now that xl2tpd is working, I intended to reply from the command line in order to clarify the process, but unfortunately this will cause an error.
Text description:

After compiling, extract the following files to the corresponding directory:

/xl2tpd/usr/local/bin/pfc
/xl2tpd/usr/local/sbin/xl2tpd
/xl2tpd/usr/local/sbin/xl2tpd-control
/xl2tpd/etc/xl2tpd/xl2tpd.conf
/xl2tpd/etc/xl2tpd/options.xl2tpd

mksquashfs xl2tpd/ xl2tpd.tcz

tce-load -iw pppd.tcz
tce-load -i xl2tpd.tcz

The basic work is done.

Offline qingquan

  • Newbie
  • *
  • Posts: 35
Re: xl2tpd compilation problem
« Reply #8 on: December 29, 2022, 02:43:35 AM »
There is one problem to deal with: pppd defaults to /usr/local/sbin and xl2tpd to usr/sbin

ln -s /tmp/tcloop/pppd/usr/local/sbin/chat /usr/sbin/chat
ln -s /tmp/tcloop/pppd/usr/local/sbin/pppd /usr/sbin/pppd
ln -s /tmp/tcloop/pppd/usr/local/sbin/pppdump /usr/sbin/pppdump
ln -s /tmp/tcloop/pppd/usr/local/sbin/pppstats /usr/sbin/pppstats
ln -s /tmp/tcloop/pppd/usr/local/sbin/pppoe-discovery /usr/sbin/pppoe-discovery
source  /etc/profile
sudo xl2tpd -D
sudo xl2tpd-control connect-lac vpn
Good, it worked!

Offline qingquan

  • Newbie
  • *
  • Posts: 35
Re: xl2tpd compilation problem
« Reply #9 on: December 29, 2022, 02:55:46 AM »
One detail is missing:
sudo mkdir /var/run/xl2tpd
It is used to store the control file l2tp-control
xl2tpd generates this file automatically

Offline qingquan

  • Newbie
  • *
  • Posts: 35
Re: xl2tpd compilation problem
« Reply #10 on: December 29, 2022, 03:03:01 AM »
      After about a week of hard work, I finally got it ready to share with you.
I know I'm a layman when it comes to packaging modules, so if anyone has
a spare moment,And familiar with packing work, can do a good job to the
warehouse. Convenient for more people to share.Thanks!

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: xl2tpd compilation problem
« Reply #11 on: December 29, 2022, 09:10:19 AM »
Hi qingquan
There is one problem to deal with: pppd defaults to /usr/local/sbin and xl2tpd to usr/sbin ...
That's caused by line  65  in  l2tp.h:
https://github.com/xelerance/xl2tpd/blob/69b241082d02f6b4c28d6aef6c97c5738e834ff1/l2tp.h#L65

You can either change it in  l2tp.h  or add the following to your  CFLAGS=  setting:
Code: [Select]
-DPPPD=\"/usr/local/bin/pppd\"

Offline qingquan

  • Newbie
  • *
  • Posts: 35
Re: xl2tpd compilation problem
« Reply #12 on: December 30, 2022, 05:45:13 AM »
Hi Rich
Modified l2tp.h, Thank you very much, I've put the compile module package to
http://forum.tinycorelinux.net/index.php/topic, 26058.0 HTML