On Thu, 2014-04-24 at 10:09 +0000, John Frankish wrote:
> > > On Tue, 2014-04-22 at 10:05 +0000, John Frankish wrote:
> > > > I compiled networkmanager-0.9.8.9 from source to /usr/local to use
> > > > dhcpcd (also compiled from source).
> > > >
> > > > Since networkmanager configured as above looks for
> > > > /usr/local/etc/hosts, I adjusted the source to look at /etc/hosts (it
> > > > already knew to look for /etc/resolv.conf).
> > > >
> > > > Run from the console, neworkmanager looks as though it connects to an
> > > > ipv4 wired network (I've tried two different networks), modifies
> > > > /etc/resolv.conf accordingly, but it does not actually connect -I
> > > > cannot ping the router nor google.com.
> > > >
> > > > Dhcpcd run alone from the console connects without problems.
> > > >
> > > > This is the same problem I experienced using networkmanager-0.9.8.8
> > > > reported in another thread.
> > > >
> > > > I've attached the networkmanager debug output and the strace output,
> > > > but neither seem to give a clue as to the problem - I believe that
> > > > either networkmanager is trying to write something to /usr/local/etc
> > > > that is in /etc (or vice versa) or there is some kind of
> > > > linux-pam/polkit permissions error, but I cannot see evidence of either
> > > > in the debug output.
> > > >
> > > > From the debug snippet below things look to have worked, but they
> > > > didn't - any troubleshooting hints would be gratefully received.
> > >
> > > The x.x.x.x/0 bits are likely the problem. Let's investigate why
> > > that's happening especially since NetworkManager says it got the right
> > > prefix from dhcpcd.
> > >
> > > Would you mind applying the attached patch to your sources? Then
> > > re-run the test and reply with the output so we can debug a bit further.
> >
> > One more thing, when things aren't working, can you provide the output
> > of:
> >
> > ip addr
> > ip route
> >
> Thanks for the reply and the patch
>
> The patch applied cleanly, but unfortunately things still do not work - debug
> output attached.
>
> My system does not have the "ip" command, but the "route" command produces
> the following:
>
> $ route
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> default 10.180.20.1 0.0.0.0 UG 0 0 0 eth0
> 10.180.20.1 * 255.255.255.255 UH 0 0 0 eth0
> 127.0.0.1 * 255.255.255.255 UH 0 0 0 lo
>
> Shouldn't that be 255.255.255.0?
Yes, and that's the problem. The issue is in your logs:
NetworkManager[6200]: <warn> nm_ip4_config_to_rtnl_addr: created
'10.180.20.104/0 inet dev (null) scope nowhere
' from '10.180.20.104/24' flags 0xD
What libnl version are you using?
I've tested current NM 0.9.8.10 git and it works OK here with libnl
3.2.24... The culprit is likely nm_ip4_config_to_rtnl_addr() which sets
the rtnl address prefix length, but not the binary address prefix
length. If you're up for another patch, try the attached and let me
know if it works correctly.
Dan
diff -up NetworkManager-0.9.8.8/src/nm-ip4-config.c.foo NetworkManager-0.9.8.8/src/nm-ip4-config.c
--- NetworkManager-0.9.8.8/src/nm-ip4-config.c.foo 2014-04-24 11:52:05.231703924 -0500
+++ NetworkManager-0.9.8.8/src/nm-ip4-config.c 2014-04-24 11:53:49.253403474 -0500
@@ -636,8 +636,16 @@ nm_ip4_config_to_rtnl_addr (NMIP4Config
if (flags & NM_RTNL_ADDR_PTP_ADDR)
success = (ip4_addr_to_rtnl_peer (priv->ptp_address, addr) >= 0);
- if (flags & NM_RTNL_ADDR_PREFIX)
- rtnl_addr_set_prefixlen (addr, nm_ip4_address_get_prefix (config_addr));
+ if (flags & NM_RTNL_ADDR_PREFIX) {
+ struct nl_addr *nladdr;
+ guint plen = nm_ip4_address_get_prefix (config_addr);
+
+ rtnl_addr_set_prefixlen (addr, plen);
+ /* rtnl_addr_set_prefixlen fails to update the nl_addr prefixlen */
+ nladdr = rtnl_addr_get_local (addr);
+ if (nladdr)
+ nl_addr_set_prefixlen (nladdr, plen);
+ }
if (flags & NM_RTNL_ADDR_BROADCAST) {
guint32 hostmask, network, bcast, netmask;
_______________________________________________
networkmanager-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/networkmanager-list