unable to configure a fixed ip on wired interface on knetworkmanager (intrepid)

Bug #279409 reported by Jools Wills on 2008-10-07
34
This bug affects 3 people
Affects Status Importance Assigned to Milestone
knetworkmanager (Ubuntu)
Undecided
Unassigned

Bug Description

I am unable to configure a fixed ip using knetworkmanager on intepid.
After configuring a fixed ip from the "edit connections" gui, I try to put it online, but get an error i syslog

Oct 7 01:50:35 travelmate NetworkManager: <WARN> connection_get_settings_cb(): connection_get_settings_cb:Invalid connection: 'NMSettingIP4Config' / 'addresses' invalid: 1

I am running knetworkmanager 1:0.7svn864988-0ubuntu1 and networkmanager 0.7~~svn20081004t225044-0ubuntu1

Jools Wills (jools) wrote :

Can noone else confirm this? I can't think that it is only my machine. Intrepid is due out real soon and this will surely be a showstopper for some users (static IPs can be configured from /etc/network/interfaces but having it not work from network-manager is not good)

I'm sure the problem is related to there being still some incompatibility with the latest network-manager API.

Jonathan Riddell (jr) on 2008-10-17
Changed in knetworkmanager:
status: New → Confirmed
Tim Kosse (tim-kosse) wrote :

I can confirm this and have been ranting about this in my IRC channel for quite a while (8.10 alpha 3 I think was earliest I tried, was already broken back then). But since setting up a network connection is something so terribly basic (everybody does it all the time), I didn't report it. I'm negatively surprised that it didn't get fixed yet, I don't have any unusual or rare hardware.

tzekwangteo (tkteo) wrote :

Welcome to the club. You are hardly alone in facing this problem.

See:

https://bugs.launchpad.net/ubuntu/+source/knetworkmanager/+bug/259278

and duplicates.

No, you're not alone, I'm facing exactly this problem, too. I used the following settings:

IP 131.173.12.227 (yes, this is a public address)
Netmask 255.255.255.0
GW 131.173.12.254
NS 131.173.245.9

When selecting the connection, knetworkmanager prints:
Activate Connection /org/freedesktop/NetworkManagerSettings/Connection/2 on Device /org/freedesktop/Hal/devices/net_00_00_f0_7a_97_d0

And syslog says:
Nov 3 14:02:40 sam NetworkManager: <WARN> connection_get_settings_cb(): connection_get_settings_cb: Invalid connection: 'NMSettingIP4Config' / 'addresses' invalid: 1
Nov 3 14:02:40 sam NetworkManager: <WARN> connection_get_settings_cb(): connection_get_settings_cb: Invalid connection: 'NMSettingIP4Config' / 'addresses' invalid: 1
Nov 3 14:02:57 sam NetworkManager: connection_updated_cb: assertion `old_connection != NULL' failed

I've replaced knetworkmanager by nm-applet which works fine with the same settings, but of course this is not a real solution but a really dirty workaround.

Jools Wills (jools) wrote :

Are any developers currently looking at this. The importance should be decided and imho it is important as a new user should expect to be able to configure their system with a fixed ip with the provided tools (it is still possible from /etc/network/interfaces of course). Kubuntu Intrepid should not have been released with this bug (And strangely enough the kubuntu site is still not updated - perhaps they have delayed in the official announcement until some bugs are fixed, or some other reason)

Jools Wills (jools) wrote :

Ah ive been looking at the wrong site. Seems kubuntu.net is not updated. confusing! I notice this bug is mentioned on the download page for kubuntu on kubuntu.org. So at least it is considered important and hopefully fixed soon.

I traced down this bug to knetworkmanager-0.7/src/knetworkmanager-connection_setting_ipv4.cpp line 220:

cur_ip.append(QDBusData::fromUInt32(swap32((*it).netmask.toIPv4Address())));

KNetworkManager provides the netmask in decimal notation, but NetworkManager expects it to be in CIDR-notation. I'm not comfortable enough in this codes to provide a patch, but there is an easy workaround you can use until this problem ist fixed. Instead of given the netmask in dotted decimal ("255.255.255.0"), just put the CIDR value into the first field and insert Zeros into the others: "24.0.0.0".

A patch could look like this:
UInt32 netmask_dec = (*it).netmask.toIPv4Address();
UInt32 netmask_cidr = 0; for (UInt32 bit = 1; bit != 0; bit++) {
  if (netmask_dec & bit) netmask_cidr++;
}
cur_ip.append(QDBusData::fromUInt32(swap32(netmask_cidr)));

The loop operator should be bit *= 2, not bit++.

logic7 (logic747) wrote :

Thanks Roland, that worked for me :) had to delete and recreate the connection profile though, simply editing did not do it.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers