Bug 158380 - ifup-ippp doesn't support proper dial-in configuration
ifup-ippp doesn't support proper dial-in configuration
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-21 06:16 EDT by Peter Bieringer
Modified: 2014-03-16 22:54 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-26 05:01:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch for proper support of dial-in (1.46 KB, patch)
2005-05-21 06:24 EDT, Peter Bieringer
no flags Details | Diff

  None (edit)
Description Peter Bieringer 2005-05-21 06:16:13 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.0.4-1.3.1 Firefox/1.0.4

Description of problem:
If one want to configure an ipppX device for dial-in, this isn't proper supported by ifup-ippp

Version-Release number of selected component (if applicable):
initscripts-7.93.7-1 (and also not current version in cvs)

How reproducible:
Always

Steps to Reproduce:
1. edit/create e.g. ifcfg-ippp1
2. ifup ippp1
3. try to dial-in from another host


Actual Results:  ipppd isn't proper setup

Expected Results:  ipppd proper setup

Additional info:

Here how a proper ipppd should be running for dial-in:

ipppd 192.0.2.1:0.0.0.0 ipparam ippp1 /dev/ippp1 bsdcomp 9,9 lzs 1:4 mru 1472mtu 1472 -callback-cbcp -pap +chap name server-dialin auth usefirstip ms-dns 192.0.2.2 ms-dns 192.0.2.3

Related ifcfg-ippp1:

DEVICE=ippp1
ONBOOT=yes

DIALIN="on"

ENCAP="syncppp"
MSN="12345678"
PHONE_OUT="0"   # no callout
PHONE_IN="1234567"

DIALMODE="manual"
IPADDR="192.0.2.1"
GATEWAY=""
NETMASK=""
DEFROUTE="no"

L2_PROT="hdlc"
L3_PROT="trans"
SECURE="on"
HUPTIMEOUT="180"
CHARGEHUP="on"
CHARGEINT="60"
IHUP="on"
DIALMAX="0"
CALLBACK="off"
CBDELAY="1"
CBHUB="on"

DNSTYPE=NOCHANGE
PEERDNS=no
DNS1="192.0.2.2"
DNS2="192.0.2.3"

AUTH="-pap +chap"
VJ="on"
VJCOMP="on"
AC="on"
PC="on"
BSDCOMP="on"
MTU="1472"
MRU="$MTU"
CBCP="off"
CCP="on"
LZS="on"
PPPOPTIONS="name server-dialin auth usefirstip" 

Note that for proper setup, the PPPOPTIONS string is still needed because not supported by ifup-ippp. But that's not a real problem.
Comment 1 Peter Bieringer 2005-05-21 06:24:45 EDT
Created attachment 114667 [details]
Patch for proper support of dial-in

Here explanation of the patch:

@@ -111,10 +111,11 @@
     # set authentication
     _auth=`echo "$AUTH" | sed 's/[a-z -]*//g'`
     if [ -n "$_auth" ]; then
-	 if [ -z "$USER" ]; then
+	 if [ -z "$USER" -a "$DIALIN" != "on" ]; then
	     log_echo " Error: $1 (syncppp) user is not set"
	     return 1
	 fi

Dial-In doesn't require a USER, btw. without this fix this lead also to a
strange behavior, because it's working after login (because here USER=root in
environment) while not working during booting called by init.


+	 if [ "$DIALIN" != "on" ]; then
	 # we should hide the user name, so i add user name to option file.
	 if [ "$AUTH" = "-pap +chap" ]; then
	     create_option_file "name \"$USER\""
@@ -122,6 +123,7 @@
	     create_option_file "user \"$USER\""
	 fi
	 options="$options file /etc/ppp/ioption-secret-$DEVICE"
+	 fi
	 # authentication options:
	 # +pap and/or +chap does not work correct by dialout - remove

No secret file is required in dial-in case, authentication data is stored in
/etc/ppp/{pap,chap}-secrets.


@@ -185,7 +187,9 @@
     if [ "$IPADDR" = "0.0.0.0" ]; then
	 options="$options ipcp-accept-local"
     else
+	 if [ "$DIALIN" != "on" ]; then
	 options="$options noipdefault"
+	 fi
     fi
     # Add device
     options="$options /dev/$DEVICE"

noipdefault isn't working in dial-in case.


@@ -249,7 +253,9 @@
     fi

     if [ "$GATEWAY" = "0.0.0.0" ]; then
+	 if [ "$DIALIN" != "on" ]; then
	 options="$options ipcp-accept-remote"
+	 fi
	 options="$IPADDR:$GATEWAY $options"
     else
	 options="$options $IPADDR:$GATEWAY"

dial-in-case shoudn't accept remote IP address by default.

Note that DIALIN variable already occurs in ifup-ippp, so it is not introduced
by me. But it is not described at all in sysconfig.txt at "IPPP-specific items
(ISDN)".
Comment 2 Ngo Than 2005-05-24 05:30:53 EDT
The feature dialin-server is not supported well in fc3. I suggest this feature
should be added in fc5. Many thanks for the patch
Comment 3 Peter Bieringer 2005-09-25 07:26:57 EDT
2 additional patches are needed to support channel bundling proper:

Do not set slave device in dialmode=auto for server config:

@@ -203,7 +207,12 @@
         [ -z "$SLAVE_DIALMAX" ] && SLAVE_DIALMAX="$DIALMAX"
         [ -z "$SLAVE_CALLBACK" ] && SLAVE_CALLBACK="$CALLBACK"
         [ -z "$SLAVE_CBDELAY" ] && SLAVE_CBDELAY="$CBDELAY"
-        [ -z "$SLAVE_DIALMODE" ] && SLAVE_DIALMODE="auto"
+        if [ "$DIALIN" != "on" ]; then
+               [ -z "$SLAVE_DIALMODE" ] && SLAVE_DIALMODE="auto"
+       else
+               # Master should not dial by default on incoming MPPP
+               [ -z "$SLAVE_DIALMODE" ] && SLAVE_DIALMODE="$DIALMODE"
+       fi

         slave=$SLAVE_DEVICE
         options="$options /dev/$slave +mp"



Do not start ibod in server mode and channel bundling, makes no sense, client
should do that only (it knows the number...)

@@ -336,7 +347,9 @@
         ipppd $options $netmask >/dev/null 2>&1

         # start ibod daemon
+       if [ "$DIALIN" != "on" ]; then
         [ "$BUNDLING" = "yes" -o "$BUNDLING" = "on" ] && [ -n "$SLAVE_DEVICE" ]
&& start_ibod $DEVICE
+       fi
     fi

     # set default gateway for dial on demand
Comment 4 Ngo Than 2005-09-26 05:01:38 EDT
it's now fixed in initscript-8.15-1 n rawhide. Many thanks for the patch  
   

Note You need to log in before you can comment on or make changes to this bug.