Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 158380 - ifup-ippp doesn't support proper dial-in configuration
Summary: ifup-ippp doesn't support proper dial-in configuration
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-05-21 10:16 UTC by Peter Bieringer
Modified: 2014-03-17 02:54 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-26 09:01:38 UTC


Attachments (Terms of Use)
Patch for proper support of dial-in (deleted)
2005-05-21 10:24 UTC, Peter Bieringer
no flags Details | Diff

Description Peter Bieringer 2005-05-21 10:16:13 UTC
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 10:24:45 UTC
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 09:30:53 UTC
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 11:26:57 UTC
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 09:01:38 UTC
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.