Bug 165698 - NM can not connect to wireless if the dhcp does not offer a default route
NM can not connect to wireless if the dhcp does not offer a default route
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: NetworkManager (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Christopher Aillon
:
: 165699 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-08-11 08:55 EDT by Ralf Ertzinger
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-07 17:02:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ralf Ertzinger 2005-08-11 08:55:59 EDT
Description of problem:
NM seems to expect the dhcp server to deliver a default route when connecting to
a wireless access point. If no default route is offered, the following appears
in the syslog and connecting fails:

dhcdbd: message_handler: message handler not found under /com/redhat/dhcp/eth1
for sub-path eth1.dbus.get.routers
NetworkManager: <WARNING>    (): get_ip4_uint32(): error calling 'routers', DHCP
daemon returned error 'org.freedesktop.DBus.Error.UnknownMethod', message
'Method "routers" with signature "" on interface "com.redhat.dhcp.dbus.get"
doesn't exist '.

The connection is then torn down.
The dhcp server offers an IP address, a netmask, a broadcast address and a DNS
server, which is enough for the case in question.

Version-Release number of selected component (if applicable):
NetworkManager-0.4-34.cvs20050729


How reproducible:
Always

Steps to Reproduce:
1. Set up dhcp server without "option routers"
2. try to connect with NM
3.
  
Actual results:
Connect fails

Expected results:
connect succeeds

Additional info:
Comment 1 Dan Williams 2005-08-11 09:15:33 EDT
*** Bug 165699 has been marked as a duplicate of this bug. ***
Comment 2 Dan Williams 2005-08-11 09:16:56 EDT
I think the way we handled this before switching to dhcdbd was to use the
address of the DHCP server as the default gateway...  we should probably be
doing that here too.
Comment 3 Ralf Ertzinger 2005-08-11 09:25:18 EDT
First, sorry for the double entry, bugzilla threw some errors at me when
submitting it the first time.

What is wrong with having no default gateway if DHCP does not offer one? Some
things work just fine that way, so there may actually be a reason for the
behaviour. I do noth think that wildly guessing gateways gets us anywhere.
Comment 4 Dan Williams 2005-08-11 09:37:21 EDT
Most things require a gateway, and most people will be in a situation where a
gateway is required and given.  I'm not sure it's worth special-casing the "no
gateway" instance here and changing a bunch of code.  Having a gateway shouldn't
hurt you here and it allows us to localize the change down to a specific spot
with only a 4 line difference, instead of going through the code and making sure
all the spots that use IP4Config info are OK with not getting a gateway.

The problem should now be fixed in NM CVS the way I describe above.
Comment 5 Ralf Ertzinger 2005-08-11 09:52:11 EDT
Yes, there will be a default gateway in this scenario. It will just not be
supplied by the DHCP server, but by the VPN connection running over the link.
VPN just needs to reach the next hop, which is within the ethernet broadcast domain.
Comment 6 Dan Williams 2005-08-11 09:59:13 EDT
I'm not disagreeing from you on a technical standpoint, I just think that the
case can be fixed with a much smaller, more localized change to the code (which
isn't even a hack!) than going through and changing the default gateway
assumption in the rest of the code.
Comment 7 Ralf Ertzinger 2005-08-11 10:27:31 EDT
Is the change you made already in CVS? Which file should I look at?
Comment 8 Dan Williams 2005-08-11 10:31:43 EDT
src/dhcp-manager/nm-dhcp-manager.c, revision 1.9:

Index: src/dhcp-manager/nm-dhcp-manager.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/dhcp-manager/nm-dhcp-manager.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- src/dhcp-manager/nm-dhcp-manager.c	13 Jul 2005 16:58:13 -0000	1.8
+++ src/dhcp-manager/nm-dhcp-manager.c	11 Aug 2005 13:31:50 -0000	1.9
@@ -479,7 +479,11 @@
 		goto out;
 
 	if (!get_ip4_uint32s (manager, dev, "routers", &ip4_gateway, &count) || !count)
-		goto out;
+	{
+		/* If DHCP doesn't have a 'routers', just use the DHCP server's address as
our gateway for now */
+		if (!get_ip4_uint32s (manager, dev, "dhcp_server_identifier", &ip4_gateway,
&count) || !count)
+			goto out;
+	}
 
 	if (!get_ip4_uint32s (manager, dev, "domain_name_servers", &ip4_nameservers,
&num_ip4_nameservers) || !num_ip4_nameservers)
 		goto out;

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