Bug 703321 - dispatcher script not passed interface
Summary: dispatcher script not passed interface
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dan Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-10 00:58 UTC by Brian Millett
Modified: 2011-06-12 23:09 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-06-12 23:09:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Brian Millett 2011-05-10 00:58:34 UTC
Description of problem:

The dispatcher scripts are not being passed the interface

Version-Release number of selected component (if applicable):

NetworkManager-0.8.999-1.fc15.x86_64

How reproducible:


Steps to Reproduce:
1.its just broke so
2.install version NetworkManager-0.8.999-1.fc15.x86_64
3.
  
Actual results:

interface name is not being passed
Expected results:

interface name should be passed


Additional info:
Here is the script
__BEGIN__
#!/bin/bash

PATH=/sbin:/usr/bin:/usr/local/bin:/bin:/usr/bin:/usr/sbin
interface=$1
opt=$2

if [ -x /usr/bin/logger ]; then
	LOGGER="/usr/bin/logger -s -p user.notice -t NetworkManagerDispatcher"
else
	LOGGER=echo
fi

$LOGGER "interface=$interface opt=$opt"

case "$opt" in
    up)
        echo 1 > /proc/sys/net/ipv4/ip_forward
        iptables -t nat -F
        iptables -t nat -A POSTROUTING -o $interface -j MASQUERADE
	$LOGGER "MASQUERADE active on $interface"
        ;;
    down)
        echo 0 > /proc/sys/net/ipv4/ip_forward
        iptables -t nat -F
	$LOGGER "MASQUERADE NOT active on $interface"
        ;;
esac
__END__

My script prints the interface & status ($1 & $2), here is the trace from the /var/log/messages 

NOTICE: NetworkManagerDispatcher: interface= opt=up

May  9 19:09:23 dufus ntpd[916]: Listen normally on 25 wlan0 192.168.0.17 UDP 123
May  9 19:09:23 dufus ntpd[916]: peers refreshed
May  9 19:09:23 dufus NetworkManager[927]: <info> Policy set 'Auto Viracocha' (wlan0) as default for IPv4 routing and DNS.
May  9 19:09:23 dufus NetworkManager[927]: <info> Activation (wlan0) successful, device activated.
May  9 19:09:23 dufus dbus-daemon: [system] Activating service name='org.freedesktop.nm_dispatcher' (using servicehelper)
May  9 19:09:23 dufus NetworkManager[927]: <info> Activation (wlan0) Stage 5 of 5 (IP Configure Commit) complete.
May  9 19:09:23 dufus dbus-daemon: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
May  9 19:09:23 dufus logger: Activating firewall script generated Tue Feb  8 14:06:41 2011 by bpm
May  9 19:09:23 dufus NetworkManagerDispatcher: interface= opt=up
May  9 19:09:23 dufus NetworkManagerDispatcher: MASQUERADE active on
May  9 19:09:23 dufus NetworkManagerDispatcher: ntpd is not running, start
May  9 19:09:27 dufus dnsmasq[1797]: reading /etc/resolv.conf
May  9 19:09:27 dufus dnsmasq[1797]: using nameserver 192.168.0.2#53

Comment 1 Jirka Klimes 2011-05-11 14:23:42 UTC
It's been fixed upstream:
a08e9b928e924eb7f1c1e35a89a84603a096ca10 (core: fix dispatcher handling of empty VPN interface (bgo #649773))

Comment 2 Brian Millett 2011-05-11 15:52:44 UTC
Good.  Looking at the bug,

https://bugzilla.gnome.org/show_bug.cgi?id=649773

that is the problem 
Bug 649773 - dispatcher-scripts are not called with both parameters

Will you notify when it is in koji for testing?

Thanks.

Comment 3 Jan Willies 2011-05-27 13:53:23 UTC
should be here now: http://koji.fedoraproject.org/koji/buildinfo?buildID=245278

Comment 4 Derek Atkins 2011-06-12 16:01:59 UTC
FWIW, I'm running NetworkManager-0.8.9997-2.git20110531.fc15.i686 and I'm still having issues with the dispatcher scripts.  See Bug #633774

In particular, sendmail and squid dont run at startup.  If I remove the dispatcher scripts then they do start properly.

Comment 5 Michal Schmidt 2011-06-12 23:09:24 UTC
Derek,

although NM dispatcher scripts are involved in bug 633774, it is a real systemd bug.

The interface is now correctly passed to dispatcher scripts with the NM version from F15 updates. Closing this bug.


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