Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 132898 - pptpd v1.3.1 - pptpd -C ANY_NUMBER causes segfault
Summary: pptpd v1.3.1 - pptpd -C ANY_NUMBER causes segfault
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Dialup Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-10 06:44 UTC by Badalian Slava
Modified: 2006-06-06 09:16 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Badalian Slava 2006-05-10 06:44:40 UTC
pptpd -C ANY_NUMBER

pptpd v1.3.1

x86 && x86_64 do seg. fault.

P.S.

Maybe add (or add flag or any other option to build other than 100 clients)
pptpd-1.3.1/defaults.h:
-#define CONNECTIONS_DEFAULT            100
+#define CONNECTIONS_DEFAULT            2048

ppp-2.4.2/pppd/sys-linux.c:
-#define MAX_IFS                100
+#define MAX_IFS                2048
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-05-10 06:48:11 UTC
Don't needlessly restrict bugs, the checkboxes are not there as a cool toy. Post emerge --info and reopen then.


Comment 2 Badalian Slava 2006-05-10 06:56:01 UTC
Portage 2.0.54 (default-linux/amd64/2006.0, gcc-3.4.5, glibc-2.3.6-r3, 2.6.15-gentoo-r7-vpn x86_64)
=================================================================
System uname: 2.6.15-gentoo-r7-vpn x86_64 Intel(R) Xeon(TM) CPU 3.20GHz
Gentoo Base System version 1.12.0_pre19
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.4.2
dev-python/pycrypto: [Not Present]
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=nocona -msse -msse2 -mmmx"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -march=nocona -msse -msse2 -mmmx"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="amd64 alsa avi berkdb bitmap-fonts bzip2 cli crypt cups dri eds emboss encode expat extensions foomaticdb fortran gdbm gif gpm gstreamer imlib isdnlog jpeg lzw lzw-tiff mp3 mpeg mysql ncurses nls nptl nptlonly opengl pam pcre pdflib perl png pppd python quicktime radius readline reflection sdl session spell spl ssl tcpd tiff truetype-fonts type1-fonts udev usb xorg xpm xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS

Comment 3 Alin Năstac (RETIRED) gentoo-dev 2006-05-12 13:10:03 UTC
Confirmed. Until we solve the segfault, you should specify your desired number of connections through the configuration file like this:
  connections 2048
It doesn't make sense to add a USE flag for this since it is only a default value of a parameter which could be set on command line or through the configuration file.

As for MAX_IFS constant defined in pppd's sources, I don't see the point in increasing its value either. It is used to scan for network settings on non-ppp&non-lo local interfaces. Such kind of interfaces tend to be permanent and started before pppX interfaces so I believe get_ether_addr() is in no danger of missing some of your network interfaces, as long as you don't have more than 99 Ethernet cards (highly unlikely).
Comment 4 Badalian Slava 2006-05-12 13:32:47 UTC
(In reply to comment #3)
> Confirmed. Until we solve the segfault, you should specify your desired number
> of connections through the configuration file like this:
>   connections 2048
> It doesn't make sense to add a USE flag for this since it is only a default
> value of a parameter which could be set on command line or through the
> configuration file.

Yep. its good news and this variant make me happy =)

> As for MAX_IFS constant defined in pppd's sources, I don't see the point in
> increasing its value either. It is used to scan for network settings on
> non-ppp&non-lo local interfaces. Such kind of interfaces tend to be permanent
> and started before pppX interfaces so I believe get_ether_addr() is in no
> danger of missing some of your network interfaces, as long as you don't have
> more than 99 Ethernet cards (highly unlikely).

I was think MAX_IFS limiting ppp connections +) if i be mistaken - sorry =) 
Thank you for your kind thought of me ;)
Comment 5 Alin Năstac (RETIRED) gentoo-dev 2006-05-12 14:40:16 UTC
fixed in 1.3.2.
the original version still had this bug, but I've fixed it with a patch.
Comment 6 Badalian Slava 2006-06-05 03:46:39 UTC
vpn1 ~ # ps ax | grep pptpd
18363 ?        Ss     0:00 /usr/sbin/pptpd --connections 1000
18406 pts/1    S+     0:00 grep pptpd

vpn1 ~ # tail -f /var/log/messages
....
Jun  5 22:45:27 vpn1 pptpd[18363]: MGR: Manager process started
Jun  5 22:45:27 vpn1 pptpd[18363]: MGR: Maximum of 100 connections available
Comment 7 Alin Năstac (RETIRED) gentoo-dev 2006-06-05 10:33:53 UTC
what pptpd.conf do you have?
Comment 8 Badalian Slava 2006-06-05 13:59:56 UTC
option /etc/ppp/options.pptpd
logwtmp
localip 172.16.1.1

#### /etc/ppp/options.pptpd

name pptpd
refuse-pap
refuse-chap
require-mschap
require-mschap-v2
ms-dns 10.10.140.250
ms-dns 10.10.250.250
proxyarp
debug
lock
nobsdcomp
novj
novjccomp
nologfd
plugin radius.so
lcp-echo-interval 10
lcp-echo-failure 5
hide-password
Comment 9 Badalian Slava 2006-06-06 05:06:38 UTC
I use radius... but it try allocate ip from /etc/pptpd.conf

added to file:
remoteip 192.168.0.1-254,192.168.1.1-254,192.168.2.1-254,192.168.3.1-254,192.168.4.1-254,192.168.5.1-254,192.168.6.1-254,192.168.7.1-254,192.168.8.1-254

and it run 2048 connections.... thanks all
Comment 10 Alin Năstac (RETIRED) gentoo-dev 2006-06-06 09:16:22 UTC
If you'll look in file pptpd.c at line 355 and look at the way processIPStr() is implemented, you will understand what is happening.
You should use --delegate if you want to manage IP addresses from radius.