Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 154497 - net-misc/networkmanager application crashes if /etc/conf.d/net is not at the state of the art
Summary: net-misc/networkmanager application crashes if /etc/conf.d/net is not at the ...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Steev Klimaszewski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-08 11:48 UTC by Fabio Erculiani
Modified: 2009-02-02 17:49 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
files/networkmanager-0.6.4-gentoobackend.patch (networkmanager-0.6.4-gentoobackend.patch,19.62 KB, patch)
2006-11-14 00:39 UTC, Nathan Caldwell
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Erculiani 2006-11-08 11:48:43 UTC
Using NetworkManager in Portage, I noticed that it segfaults if in /etc/conf.d/net there are these "malformed" but accepted and valid (not all) config parameters:

config_ethXX="dhcp" --> segfault
config_ethXX=("dhcp") --> segfault --> not the missing space between brackets
iface_ethXX=("dhcp") --> not anymore supported but NM crashes (SIG 11)
iface_ethXX=( "dhcp" ) --> not anymore supported but NM crashes (SIG 11)

The only valid setting is: config_ethXX=( "dhcp" ) --> this works
Comment 1 Luis Medinas (RETIRED) gentoo-dev 2006-11-08 12:15:54 UTC
known issue this is being worked. we need to push our patches to get this working to upstream cvs and then put it on portage.
Comment 2 Fabio Erculiani 2006-11-08 12:27:35 UTC
nice to know :) thanks dev.
Comment 3 Nathan Caldwell 2006-11-14 00:38:49 UTC
Here's the backend I've been working on if you want to test it.

It supports most config options that NM can handle, except dialup, wireless (upstream is working on a seperate system-wide configuration for this anyway), and nis domain names.

Any comments would be appriciated, if something doesn't work, please recompile with USE="debug" and post any <debug> lines that NM prints from your system log.

@metalgod: This is a newer patch than the one I emailed you.
Comment 4 Nathan Caldwell 2006-11-14 00:39:40 UTC
Created attachment 101897 [details, diff]
files/networkmanager-0.6.4-gentoobackend.patch
Comment 5 Fabio Erculiani 2006-11-15 00:21:07 UTC
Just for every bug watcher, I've added the new patched NM (_pre20061115) to the "sabayon" overlay.
Comment 6 Fabio Erculiani 2006-11-18 08:49:43 UTC
Only one thing does not work out of the box: DNS. resolv.conf gets completely overwritten by networkmanager. I still have to see if dhcp_ethX="nodns" might help.
Comment 7 Nathan Caldwell 2006-11-18 12:24:16 UTC
(In reply to comment #6)
> Only one thing does not work out of the box: DNS. resolv.conf gets completely
> overwritten by networkmanager. I still have to see if dhcp_ethX="nodns" might
> help.
> 

Currently the backend doesn't check one weather it's allowed to overwrite reslov.conf or not, it just does. Shouldn't be too hard to add in, I'll look into it.
Comment 8 Fabio Erculiani 2006-11-19 03:54:21 UTC
ok, we are soo close then.

anyway, playing with net.example and NM sources, I found that I only need to set dns_servers_ethX=" xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx " to get DNS configuration working with NM.

So, feel free to close this bug if you want. Well done guys! :)
Comment 9 Luis Medinas (RETIRED) gentoo-dev 2006-11-25 22:38:50 UTC
i added Nathan patch to the tree i'll fix the resolv.conf problem before commit his changes and my changes to upstream cvs. Please help test the backend so we can get it at perfect state on upstream cvs.

Thanks all 
Comment 10 Andreas Proschofsky (RETIRED) gentoo-dev 2006-11-28 00:36:57 UTC
(In reply to comment #9)
> i added Nathan patch to the tree i'll fix the resolv.conf problem before commit
> his changes and my changes to upstream cvs. Please help test the backend so we
> can get it at perfect state on upstream cvs.
> 
> Thanks all 
> 

The new backend mostly works fine here, with one quite major exception: On wired networks the resolv.conf is not written correctly, it's just empty after a dhcp-connect. Wireless works fine, though
Comment 11 Luis Medinas (RETIRED) gentoo-dev 2006-11-28 01:21:08 UTC
yes i notice that too another thing is that dhcp is replacing hostname i'm going to fix that. Again please test the best you can since i will commit this to upstream cvs.
Comment 12 Nolan Eakins 2006-12-03 00:18:13 UTC
I didn't realize that ESSID was supposed to be replaced with an interface name. The comments in /etc/conf.d/net should be updated. Also, setting dhcp_eth1 to "nodns" while having dns_servers_eth0 set causes whichever interface that gets started last to replace resolve.conf. I expected entries for each interface to get added.
Comment 13 Fabio Erculiani 2006-12-04 06:11:24 UTC
from /etc/conf.d/net.example:

lxnay ~ # cat /etc/conf.d/net.example | grep "dns_servers"
#dns_servers_ESSID=( "192.168.0.1" "192.168.0.2" )
#mac_dns_servers_001122334455=( "192.168.0.1" "192.168.0.2" )
#dns_servers_192168000001=( "192.168.0.1" )
#dns_servers_010000000001=( "10.0.0.1" )
#dns_servers_192168000001_001122AABBCC=( "192.168.0.1" )
#dns_servers_010000000001_334455DDEEFF=( "10.0.0.1" )
# To use dns settings such as these, dns_servers_eth0 must be set!
#dns_servers_eth0="192.168.0.2 192.168.0.3"
Comment 14 Nathan Caldwell 2006-12-05 15:18:07 UTC
@Andreas, I'm working on getting the resolv.conf issues fixed.

(In reply to comment #12)
> I didn't realize that ESSID was supposed to be replaced with an interface name.
> The comments in /etc/conf.d/net should be updated. Also, setting dhcp_eth1 to
> "nodns" while having dns_servers_eth0 set causes whichever interface that gets
> started last to replace resolve.conf. I expected entries for each interface to
> get added.
> 

The comments in /etc/conf.d/net.example are correct. NetworkManager only reads the config when starting up (thus it doesn't know the ESSID yet), and it only passes along an interface name to the backend functions. So there is no way of doing what the net scripts do properly. What I'm working on will just read all the possible ESSIDs pass them to NM, but you still won't be able to configure a device using it's ESSID. You will still have to use the interface. Hopefully the system-wide NM config will take care of this.
Comment 15 Matteo Settenvini 2007-05-20 12:43:23 UTC
While we're at it: I'm using NetworkManager 0.6.5, and I noticed grepping syslog that it tries to spawn some processes with a wrong path. For example, it tries to spawn "/usr/bin/killall" but on my machine it's just "/bin/killall".

Should be trivial to fix. An example (it's the only one I'm aware of):

nm_spawn_process(): nm_spawn_process('/usr/bin/killall -q nscd'): could not spawn process. (Failed to execute child process "/usr/bin/killall" (No such file or directory))

The configuration script should perform a `which killall` afaik...
Comment 16 Steev Klimaszewski (RETIRED) gentoo-dev 2008-02-02 07:41:56 UTC
Is this still an issue for you with the latest versions?
Comment 17 Dominik Kozaczko 2009-02-02 15:11:39 UTC
Yes, it's still an issue. networkmanager-0.6.6 still overwrites /etc/resolv.conf and does not obey rules in /etc/conf.d/net

I configured dhclient and dhcpcd (don't know why I have both) not to overwrite resolv.conf, yet it still gets overwritten.
Comment 18 Pacho Ramos gentoo-dev 2009-02-02 15:17:20 UTC
I think that Steev was referring to 0.7
Comment 19 Dominik Kozaczko 2009-02-02 15:59:44 UTC
A year ago? ;) NM 0.7 was introdcued in Gentoo on 4 Dec 2008 :)
Comment 20 Pacho Ramos gentoo-dev 2009-02-02 17:49:49 UTC
(In reply to comment #19)
> A year ago? ;) NM 0.7 was introdcued in Gentoo on 4 Dec 2008 :)
> 

Oops, I misread if and thought it asked it in 2009 :-S