[Bug 668613] New: ifroute fails if it was started from ifup <int>
https://bugzilla.novell.com/show_bug.cgi?id=668613 https://bugzilla.novell.com/show_bug.cgi?id=668613#c0 Summary: ifroute fails if it was started from ifup <int> Classification: openSUSE Product: openSUSE 11.3 Version: Final Platform: x86 OS/Version: openSUSE 11.3 Status: NEW Severity: Normal Priority: P5 - None Component: Network AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: kviset@mail.ru QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9.2.13) Gecko/20101203 SUSE/3.6.13-0.2.1 Firefox/3.6.13 I'm trying to auto add route for pptp connections. But using ifroute-dsl0 fails. Reproducible: Always Steps to Reproduce: 1. Create symbolik link: ln -s /etc/sysconfig/network/scripts/ifup-route /etc/sysconfig/network/if-up.d/ifup-route 2. Create /etc/sysconfig/network/ifroute-dsl0 with: 192.168.52.0 0.0.0.0 255.255.255.0 dsl0 3. Execute ifup dsl0 -o debug Actual Results: # ifup dsl0 -o debug dsl0 name: DSL Enter the password for the internet provider. Password: interface dsl0 is up executing additional global start script if-up.d/21-cifs executing additional global start script if-up.d/21-dhcpcd-hook-samba executing additional global start script if-up.d/ifup-route interface dsl0 is not up executing additional global start script if-up.d/ndp-proxy executing additional global start script if-up.d/SuSEfirewall2 Content of ifcfg-dsl0: BOOTPROTO='none' DEVICE='eth0' MODEM_IP='89.105.151.55' NAME='DSL ' PPPD_OPTIONS='' PPPMODE='pptp' PROVIDER='provider0' STARTMODE='manual' UDI='' USERCONTROL='yes' VPIVCI='' If I trying execute ifroute dsl0 after ifup dsl0, all run properly. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=668613 https://bugzilla.novell.com/show_bug.cgi?id=668613#c wei wang <wewang@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wewang@novell.com AssignedTo|bnc-team-screening@forge.pr |bili@novell.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=668613 https://bugzilla.novell.com/show_bug.cgi?id=668613#c1 Li Bin <bili@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |kviset@mail.ru --- Comment #1 from Li Bin <bili@novell.com> 2011-02-22 03:36:37 UTC --- Konstantin, I read the script, when judge whether the interface is up or not, it failed. is_iface_up () { test -z "$1" && return 1 test -d /sys/class/net/$1 || return 1 case "`LC_ALL=POSIX ip link show $1 2>/dev/null`" in *$1*UP*) ;; *) return 1 ;; esac } So I need more debug info, could you change the /etc/sysconfig/network/scripts/functions. is_iface_up () { echo "judge begin!!!" test -z "$1" && return 1 echo "not zero!!" test -d /sys/class/net/$1 || return 1 echo "have class!!" case "`LC_ALL=POSIX ip link show $1 2>/dev/null`" in *$1*UP*) ;; *) return 1 ;; esac } -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=668613 https://bugzilla.novell.com/show_bug.cgi?id=668613#c2 Konstantin Velichko <kviset@mail.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|kviset@mail.ru | --- Comment #2 from Konstantin Velichko <kviset@mail.ru> 2011-02-22 17:33:00 UTC --- Hello, I'm change file /etc/sysconfig/network/scripts/functions from line 104 with your functions: is_iface_up () { echo "judge begin!!!" test -z "$1" && return 1 echo "not zero!!" test -d /sys/class/net/$1 || return 1 echo "have class!!" case "`LC_ALL=POSIX ip link show $1 2>/dev/null`" in *$1*UP*) ;; *) return 1 ;; esac } After this, I'm try to execute ifup dsl0 -o debug. Output: ifup dsl0 -o debug dsl0 name: DSL Enter the password for the internet provider. Password: interface dsl0 is up executing additional global start script if-up.d/21-cifs executing additional global start script if-up.d/21-dhcpcd-hook-samba executing additional global start script if-up.d/55-samba-winbindd executing additional global start script if-up.d/ifup-route judge begin!!! not zero!! interface dsl0 is not up executing additional global start script if-up.d/ndp-proxy executing additional global start script if-up.d/SuSEfirewall2 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=668613 https://bugzilla.novell.com/show_bug.cgi?id=668613#c3 Li Bin <bili@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |kviset@mail.ru --- Comment #3 from Li Bin <bili@novell.com> 2011-02-23 03:28:22 UTC --- Konstantin, So it was caused that the /sys/class/net/dsl0 not createad, but don't know why, maybe it need more time to finish the 'up' operation. is_iface_up () { echo "judge begin!!!" test -z "$1" && return 1 echo "not zero!!" sleep 10 echo "wait 10 seconds!!" test -d /sys/class/net/$1 || return 1 echo "have class!!" case "`LC_ALL=POSIX ip link show $1 2>/dev/null`" in *$1*UP*) ;; *) return 1 ;; esac } So how about after change like this? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=668613 https://bugzilla.novell.com/show_bug.cgi?id=668613#c4 Konstantin Velichko <kviset@mail.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|kviset@mail.ru | --- Comment #4 from Konstantin Velichko <kviset@mail.ru> 2011-02-23 15:16:45 UTC --- I'm edit file /etc/sysconfig/network/scripts/functions and add sleep After this, I'm try to execute ifup dsl0 -o debug. Output: ifup dsl0 -o debug dsl0 name: DSL Enter the password for the internet provider. Password: interface dsl0 is up executing additional global start script if-up.d/21-cifs executing additional global start script if-up.d/21-dhcpcd-hook-samba executing additional global start script if-up.d/55-samba-winbindd executing additional global start script if-up.d/ifup-route judge begin!!! not zero!! wait 10 seconds!! have class!! executing additional global start script if-up.d/ndp-proxy executing additional global start script if-up.d/SuSEfirewall2 Route was added. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=668613 https://bugzilla.novell.com/show_bug.cgi?id=668613#c5 Li Bin <bili@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |mt@novell.com --- Comment #5 from Li Bin <bili@novell.com> 2011-02-24 07:03:28 UTC --- Marius, Do you know what's the correct way to fix this issue? I thought add the sleep is not a good solution. Thanks! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=668613 https://bugzilla.novell.com/show_bug.cgi?id=668613#c6 Marius Tomaschewski <mt@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW CC| |lnussel@novell.com, | |mt@novell.com InfoProvider|mt@novell.com | --- Comment #6 from Marius Tomaschewski <mt@novell.com> 2011-02-24 08:50:14 UTC --- (In reply to comment #0)
User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9.2.13) Gecko/20101203 SUSE/3.6.13-0.2.1 Firefox/3.6.13
I'm trying to auto add route for pptp connections. But using ifroute-dsl0 fails.
Reproducible: Always
Steps to Reproduce: 1. Create symbolik link: ln -s /etc/sysconfig/network/scripts/ifup-route /etc/sysconfig/network/if-up.d/ifup-route
This is wrong. ifup will execute ifup-route automatically.
2. Create /etc/sysconfig/network/ifroute-dsl0 with: 192.168.52.0 0.0.0.0 255.255.255.0 dsl0
Content of ifcfg-dsl0: BOOTPROTO='none' ^^^^^^^^^^^^^^^^
This should be the reason: Use BOOTPROTO='static' instead. A 'none' is for bonding slaves (and another special cases), where you want to *disable* the setup inclusive setting the interface into "up" state ("ip link set up dev XXX"), ip configuration and ifup-route run. [When (the ppp scripts/daemon call "ip link set up dev eth0" anyway; I don't know if they actually do), then you may set BOOTPROTO='none' in ifcfg-eth0 when you don't use it otherwise / as "tty" only] -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=668613 https://bugzilla.novell.com/show_bug.cgi?id=668613#c7 Li Bin <bili@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |kviset@mail.ru --- Comment #7 from Li Bin <bili@novell.com> 2011-02-24 09:42:54 UTC --- Konstantin, From the Marius comment, how about don't link the ifup-route? Thanks! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=668613 https://bugzilla.novell.com/show_bug.cgi?id=668613#c8 --- Comment #8 from Konstantin Velichko <kviset@mail.ru> 2011-02-24 14:16:15 UTC --- Hello, I tried the following: #rm if-up.d/ifup-route #ifup dsl0 -o debug dsl0 name: DSL Enter the password for the internet provider. Password: interface dsl0 is up executing additional global start script if-up.d/21-cifs executing additional global start script if-up.d/21-dhcpcd-hook-samba executing additional global start script if-up.d/55-samba-winbindd executing additional global start script if-up.d/ndp-proxy executing additional global start script if-up.d/SuSEfirewall2 But route was not added. ifup do not execute ifup-route automatically. Change BOOTPROTO='static' ifup dsl0 -o debug dsl0 name: DSL Enter the password for the internet provider. Password: interface dsl0 is up executing additional global start script if-up.d/21-cifs executing additional global start script if-up.d/21-dhcpcd-hook-samba executing additional global start script if-up.d/55-samba-winbindd executing additional global start script if-up.d/ndp-proxy executing additional global start script if-up.d/SuSEfirewall2 Route was not added. I'm return sym-link: ln -s /etc/sysconfig/network/scripts/ifup-route /etc/sysconfig/network/if-up.d/ifup-route And comment sleep: is_iface_up () { echo "judge begin!!!" test -z "$1" && return 1 echo "not zero!!" # sleep 10 # echo "wait 10 seconds!!" test -d /sys/class/net/$1 || return 1 echo "have class!!" case "`LC_ALL=POSIX ip link show $1 2>/dev/null`" in *$1*UP*) ;; *) return 1 ;; esac } Output: ifup dsl0 -o debug dsl0 name: DSL Enter the password for the internet provider. Password: interface dsl0 is up executing additional global start script if-up.d/21-cifs executing additional global start script if-up.d/21-dhcpcd-hook-samba executing additional global start script if-up.d/55-samba-winbindd executing additional global start script if-up.d/ifup-route judge begin!!! not zero!! have class!! interface dsl0 is not up executing additional global start script if-up.d/ndp-proxy executing additional global start script if-up.d/SuSEfirewall2 route was not added. ifcfg-dsl0 was created yast's. I used for it this http://ru.opensuse.org/VPN HOWTO. And BOOTPROTO='none' was automatic generated. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=668613 https://bugzilla.novell.com/show_bug.cgi?id=668613#c9 Marius Tomaschewski <mt@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW CC|lnussel@novell.com |bili@novell.com, | |max@novell.com InfoProvider|kviset@mail.ru | AssignedTo|bili@novell.com |lnussel@novell.com --- Comment #9 from Marius Tomaschewski <mt@novell.com> 2011-02-24 15:35:18 UTC --- (In reply to comment #8) Hmm... Seems, some things changed a lot since I've used ppp last time... The workflow is: - ifup dsl0 starts /etc/sysconfig/network/scripts/ifup-ppp calling smpppd-ifcfg --up what triggers smpppd to connect(?) note: ifup-route is not called in this case as the interface does not exists, ... - the ppp daemon creates the interface and tries to connect; when the connection has been established, the ppp daemon calls /etc/ppp/ip-up. And /etc/ppp/ip-up is responsible for the ifup post scripts, that is also to call ifup-route. When I look into /etc/ppp/ip-up, the post scripts (alias "dhcp") has been disabled for some reason: # run ifup script to execute additional scripts run_ifup() { [ -z "$ifcfg" -o -z "$INTERFACE" ] && return /sbin/ifup $ifcfg $INTERFACE -o dhcp 2>&1 | logger -t ifup } [...] case "$BASENAME" in *-up) [...] #run_ifup ^^^^^^^^^ Workaround would be to a) remove the comment at run_ifup b) add a /etc/ppp/ip-up.d/ip-up-route doing it: #!/bin/bash INTERFACE=$1 test "x$INTERFACE" = x && exit 1 case "$0" in *ip-up.d*) if test -f "/etc/sysconfig/network/ifcfg-$INTERFACE" ; then # execute the usual post scripts (-o dhcp) /sbin/ifup $INTERFACE -o dhcp 2>&1 | logger -t ifup # or e.g. just route only: #/etc/sysconfig/network/scripts/ifup-route $INTERFACE 2>&1 | logger -t ifup-route fi ;; esac Reassigning to Ludwig (osc bugowner -e smpppd). Ludwig, would you take a look at this issue, especially why the ifup post scripts have been disabled in ip-up? Were there some problem with them? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=668613 https://bugzilla.novell.com/show_bug.cgi?id=668613#c10 --- Comment #10 from Marius Tomaschewski <mt@novell.com> 2011-02-24 15:53:51 UTC --- Ahm... It seems, I found the reason -- it has been disabled because of a improper fox added to /sbin/ifup a long time ago in bug 85849: # /sbin/ifup vlan50 -o dhcp Interface vlan50 is not configured for dhcp. So don't use '-o dhcp'. ###################################################################### # work around bug 85849 # If interface is not configured for dhcp, but ifup/down -o dhcp was # called from dhcpcd, then exit. This case may happen when dhcpcd was # called directly. if [ "${BOOTPROTO:0:4}" != dhcp -a "$DHCP" = yes ] ; then logerror "Interface $INTERFACE is not configured for dhcp." \ "So don't use '-o dhcp'." exit $R_USAGE fi Well... I'd say, it has been not properly fixed :-( -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=668613 https://bugzilla.novell.com/show_bug.cgi?id=668613#c11 --- Comment #11 from Marius Tomaschewski <mt@novell.com> 2011-02-24 16:06:01 UTC --- Created an attachment (id=416038) --> (http://bugzilla.novell.com/attachment.cgi?id=416038) /etc/ppp/ip-up.d/run_ifup-route Konstantin, as I see, we have to discuss this issue with Ludwig when he is back. Can you live with the workaround b) from comment 9 (run route only) for a while? Save & install the attached script: install -m 755 /tmp/run_ifup-route /etc/ppp/ip-up.d/run_ifup-route it should be called at correct time. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=668613 https://bugzilla.novell.com/show_bug.cgi?id=668613#c12 Marius Tomaschewski <mt@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |kviset@mail.ru --- Comment #12 from Marius Tomaschewski <mt@novell.com> 2011-02-24 16:07:38 UTC --- See above. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=668613 https://bugzilla.novell.com/show_bug.cgi?id=668613#c13 --- Comment #13 from Konstantin Velichko <kviset@mail.ru> 2011-02-26 05:50:05 UTC --- Ok. I can use "b" on some time. =) I made this changes and it works properly... thanks for this -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=668613 https://bugzilla.novell.com/show_bug.cgi?id=668613#c14 Li Bin <bili@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- InfoProvider|kviset@mail.ru |maintenance@opensuse.org --- Comment #14 from Li Bin <bili@novell.com> 2011-02-28 03:55:15 UTC --- Maintenance, Do we need a updates for this issue? Thanks! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=668613 https://bugzilla.novell.com/show_bug.cgi?id=668613#c15 Ludwig Nussel <lnussel@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|maintenance@opensuse.org | --- Comment #15 from Ludwig Nussel <lnussel@novell.com> 2011-02-28 09:06:35 CET --- (In reply to comment #9)
(In reply to comment #8)
Hmm... Seems, some things changed a lot since I've used ppp last time...
Must have been a long, long time ago then. Last time I touched the ip-up scripts was in 2004 and smpppd hasn't changed much for even longer :-)
The workflow is: - ifup dsl0 starts /etc/sysconfig/network/scripts/ifup-ppp calling smpppd-ifcfg --up what triggers smpppd to connect(?)
smpppd-ifcfg starts pppd directly itself. smpppd-ifcfg connects to smpppd to tell it about the connection status though.
would you take a look at this issue, especially why the ifup post scripts have been disabled in ip-up? Were there some problem with them?
Karsten disabled the calls due to bug 54048 in 2004. I didn't dare to touch that area again. Reading that old bug proper fix would have been to not take the link down in ifdown if DoD is configured I guess. (In reply to comment #14)
Maintenance,
Do we need a updates for this issue?
The bug (or missing feature) is really old and a workaround exists so no need for an update IMO. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=668613 https://bugzilla.novell.com/show_bug.cgi?id=668613#c16 Ludwig Nussel <lnussel@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX --- Comment #16 from Ludwig Nussel <lnussel@suse.com> 2013-09-26 15:21:55 CEST --- smpppd is basically dead. I can't take care anymore. sorry :( -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com