Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 483468

Summary: net-misc/networkmanager - nm does not set IP4_NUM_ADDRESSES in environment
Product: Gentoo Linux Reporter: Ryan Li <ryanli>
Component: [OLD] GNOMEAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED TEST-REQUEST    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info networkmanager

Description Ryan Li 2013-09-03 09:31:43 UTC
Hi,

I am writing a dispatch script for NetworkManager that sets a specific route when a network is up.

I looked at NetworkManager's man page and it says:

> The environment contains more information about the interface...
> IP4_NUM_ADDRESSES contains the number addresses the script may expect.

However, I put some debug lines in my dispatch script and here's the output:
> DEVICE_IP_IFACE=eth0
> CONNECTION_UUID=cd76e84d-****-****-****-7956e10a8291
> DEVICE_IFACE=eth0
> IP6_NUM_ADDRESSES=2
> CONNECTION_ID=Wired connection 1
> PWD=/
> IP4_NUM_ROUTES=0
> SHLVL=1
> IP6_ADDRESS_1=f47b:f301::****:****:0:0/64 87c:f301::****:****:0:0
> IP6_ADDRESS_0=c47b:f301::****:****:0:0/64 d87b:f301::****:****:0:0

IP4_NUM_ADDRESSES isn't set as an environment variable, and a couple seconds after the dispatch script is run, I could see interface eth0 assigned an IPv4 address. So I assume that the dispatch script is being run prematurely.

Reproducible: Always
Comment 1 Ryan Li 2013-09-03 09:32:11 UTC
Created attachment 357750 [details]
emerge --info networkmanager
Comment 2 Gilles Dartiguelongue (RETIRED) gentoo-dev 2013-09-04 19:07:28 UTC
does it work if you change the settings in NM to say "require ipv4 connectivity for this interface to work".

It's in nm-connection-editor, not the gnome-control-center network panel.
Comment 3 Ryan Li 2013-09-05 04:55:58 UTC
No it doesn't work. I get the same output.
Comment 4 Pacho Ramos gentoo-dev 2013-09-29 10:42:30 UTC
What networkmanager version? Are you using ifnet or keyfile plugin?
Comment 5 Ryan Li 2013-09-30 02:46:33 UTC
(In reply to Pacho Ramos from comment #4)
> What networkmanager version? Are you using ifnet or keyfile plugin?

$ equery list networkmanager
 * Searching for networkmanager ...
[IP-] [  ] net-misc/networkmanager-0.9.6.4:0

I am not using any plugins.
Comment 6 Pacho Ramos gentoo-dev 2013-09-30 06:45:32 UTC
Try with 0.9.8.4, you are probably using ifnet if you haven't touched anything
Comment 7 Pacho Ramos gentoo-dev 2013-12-09 08:55:48 UTC
(In reply to Pacho Ramos from comment #6)
> Try with 0.9.8.4, you are probably using ifnet if you haven't touched
> anything

Also try with 0.9.8.8 and post "emerge -Opv networkmanager" output