[Pkg-utopia-maintainers] Bug#408333: network-manager: allow-auto and hostname support missing

Osamu Aoki osamu at debian.org
Sun Jan 11 03:17:24 UTC 2009


Package: network-manager
Version: 0.6.6-2
Followup-For: Bug #408333

I realized that network-manager was not happy even if there is hostname
stanza as below

auto eth0
iface eth0 inet dhcp
 hostname "mymachine"

I know it is documented behavior but I looked into source.  I see
debian/patch/05-debian_backend.patch has

+       /* If the interface is listed and isn't marked "auto" then it's
+        * definitely not okay to control it.
+        */
+       for (curr_b = ifparser_getfirst (); curr_b; curr_b = curr_b->next) {
+               if ((!strcmp (curr_b->type, "auto") || !strcmp (curr_b->type, "allow-hotplug"))
+                   && strstr (curr_b->name, iface))
+                       blacklist = FALSE;
+       }
+
+       /* If the interface has no options other than just "inet dhcp"
+        * it's probably ok to fiddle with it.
+        */
+       for (curr_d = curr_device->info; curr_d; curr_d = curr_d->next) {
+               if (strcmp (curr_d->key, "inet")
+                   || strcmp (curr_d->data, "dhcp" ))
+                       blacklist = TRUE;
+       }
+
+out:

and also found this bug report with pach adding "goto out"

I see few more problems remaining around here.

 * allow-auto is not taken care.
 * hostname line should be allowed.

"allow-auto" and "auto" are synonyms. (see interfaces(5))  This means

+               if ((!strcmp (curr_b->type, "auto") || !strcmp (curr_b->type, "allow-hotplug"))

should be more like

+               if ((!strcmp (curr_b->type, "auto") || !strcmp (curr_b->type, "allow-hotplug") || !strcmp (curr_b->type, "allow-auto"))

And for hostname

+               if (strcmp (curr_d->key, "inet")
+                   || strcmp (curr_d->data, "dhcp" ))

should also skip "hostname" stanza.  I guess something like (I am not quite sure though):

+               if ((strcmp (curr_d->key, "inet")
+                   || strcmp (curr_d->data, "dhcp" )) && strcmp (curr_d->name, "hostname") )

Also nm_system_set_hostname and nm_system_get_mtu are empty function in
NetworkManagerDebian.c.  Is this OK?  Should not we use hostname and mtu
value?

(I know MTU stanza are only for static in Debian at this moment.  For
DHCP, we need "pre-up /sbin/ifconfig $IFACE mtu 1454" to set it.
Parsing for this one may be too intrusive and fixing ifupdown to accept
MTU may be better.  Then we can use MTU value from /e/n/i)

By the way, I have not tested patch attached to the parent bug report
nor checked latest experimental package situation.

Osamu

-- System Information:
Debian Release: 5.0
  APT prefers unstable
  APT policy: (800, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages network-manager depends on:
ii  adduser                       3.110      add and remove users and groups
ii  dbus                          1.2.1-4    simple interprocess messaging syst
ii  dhcdbd                        3.0-5      D-Bus interface to the ISC DHCP cl
ii  hal                           0.5.11-8   Hardware Abstraction Layer
ii  ifupdown                      0.6.8+nmu1 high level tools to configure netw
ii  iproute                       20080725-2 networking and traffic control too
ii  libc6                         2.7-18     GNU C Library: Shared libraries
ii  libdbus-1-3                   1.2.1-4    simple interprocess messaging syst
ii  libdbus-glib-1-2              0.76-1     simple interprocess messaging syst
ii  libgcrypt11                   1.4.1-2    LGPL Crypto library - runtime libr
ii  libglib2.0-0                  2.16.6-1   The GLib library of C routines
ii  libgpg-error0                 1.4-2      library for common error values an
ii  libhal1                       0.5.11-8   Hardware Abstraction Layer - share
ii  libiw29                       29-1.1     Wireless tools - library
ii  libnl1                        1.1-3      library for dealing with netlink s
ii  libnm-util0                   0.6.6-2    network management framework (shar
ii  lsb-base                      3.2-20     Linux Standard Base 3.2 init scrip
ii  wpasupplicant                 0.6.4-3    Client support for WPA and WPA2 (I

Versions of packages network-manager recommends:
ii  network-manager-gnome         0.6.6-3    network management framework (GNOM

network-manager suggests no packages.

-- no debconf information






More information about the Pkg-utopia-maintainers mailing list