Debian Bug report logs - #606565
sysvinit: Shut down network interfaces correctly on BSDs

version graph

Package: sysvinit; Maintainer for sysvinit is Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>; Source for sysvinit is src:sysvinit.

Reported by: Guillem Jover <guillem@debian.org>

Date: Fri, 10 Dec 2010 05:45:01 UTC

Severity: normal

Tags: patch

Found in version sysvinit/2.88dsf-13

Fixed in version sysvinit/2.88dsf-13.12

Done: Robert Millan <rmh@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#606565; Package sysvinit. (Fri, 10 Dec 2010 05:45:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guillem Jover <guillem@debian.org>:
New Bug report received and forwarded. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. (Fri, 10 Dec 2010 05:45:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Guillem Jover <guillem@debian.org>
To: submit@bugs.debian.org
Subject: sysvinit: Shut down network interfaces correctly on BSDs
Date: Fri, 10 Dec 2010 06:40:32 +0100
[Message part 1 (text/plain, inline)]
Package: sysvinit
Version: 2.88dsf-13
Severity: normal
Tags: patch
User: debian-bsd@lists.debian.org
Usertags: kfreebsd

Hi!

On BSDs (and particularly on GNU/kFreeBSD) the halt code to shut down
network interfaces is buggy. The problem stems from the fact that
SIOCGIFCONF has some portability issues.

On Linux the buffer returned is a list of consecutive ifreq structs,
each of the same size. On the BSDs the ifreq structs can have
different sizes, depending on the sockaddr length, but always with at
least a size of ifreq. So the next ifreq struct has to be computed
dynamically. I'm using _SIZEOF_ADDR_IFREQ because at least the BSDs
provide that macro, so it might avoid the need to define it at all.

Because the package does not have any kind of configure support I've
hardcoded a list of systems that have the sa_len member in struct
sockaddr, those same that have variable ifreq structs returned from
SIOCGIFCONF.

The patch also fixes few more things:

* The loopback interface on BSDs can be named as something like lo0,
  so check only the first two characters.
* On the BSDs the ifr_flags is split into two shorts, and to properly
  change its value, it needs to be composed from both ifr_flags and
  ifr_flagshigh, we use a temporary for that now.

This shows up on GNU/kFreeBSD as extremely ugly errors on halt/reboot as
the interface name is garbage, the SIOCGIFFLAGS fails and then prints
that garbage string stating that it's not a known device or file. It's
also confusing the fact that the error messages are prefixed with
"ifdown" which might incorrectly point people to ifupdown. This might
be worth changing too, though.

Patch attached.

thanks,
guillem
[sysvinit_ifdown_bsd.patch (text/x-diff, attachment)]

Reply sent to Robert Millan <rmh@debian.org>:
You have taken responsibility. (Fri, 14 Oct 2011 22:06:06 GMT) Full text and rfc822 format available.

Notification sent to Guillem Jover <guillem@debian.org>:
Bug acknowledged by developer. (Fri, 14 Oct 2011 22:06:06 GMT) Full text and rfc822 format available.

Message #10 received at 606565-close@bugs.debian.org (full text, mbox):

From: Robert Millan <rmh@debian.org>
To: 606565-close@bugs.debian.org
Subject: Bug#606565: fixed in sysvinit 2.88dsf-13.12
Date: Fri, 14 Oct 2011 22:02:38 +0000
Source: sysvinit
Source-Version: 2.88dsf-13.12

We believe that the bug you reported is fixed in the latest version of
sysvinit, which is due to be installed in the Debian FTP archive:

initscripts_2.88dsf-13.12_kfreebsd-i386.deb
  to main/s/sysvinit/initscripts_2.88dsf-13.12_kfreebsd-i386.deb
sysv-rc_2.88dsf-13.12_all.deb
  to main/s/sysvinit/sysv-rc_2.88dsf-13.12_all.deb
sysvinit-utils_2.88dsf-13.12_kfreebsd-i386.deb
  to main/s/sysvinit/sysvinit-utils_2.88dsf-13.12_kfreebsd-i386.deb
sysvinit_2.88dsf-13.12.diff.gz
  to main/s/sysvinit/sysvinit_2.88dsf-13.12.diff.gz
sysvinit_2.88dsf-13.12.dsc
  to main/s/sysvinit/sysvinit_2.88dsf-13.12.dsc
sysvinit_2.88dsf-13.12_kfreebsd-i386.deb
  to main/s/sysvinit/sysvinit_2.88dsf-13.12_kfreebsd-i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 606565@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Robert Millan <rmh@debian.org> (supplier of updated sysvinit package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Fri, 14 Oct 2011 23:27:34 +0200
Source: sysvinit
Binary: sysvinit sysvinit-utils sysv-rc initscripts
Architecture: source kfreebsd-i386 all
Version: 2.88dsf-13.12
Distribution: unstable
Urgency: low
Maintainer: Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>
Changed-By: Robert Millan <rmh@debian.org>
Description: 
 initscripts - scripts for initializing and shutting down the system
 sysv-rc    - System-V-like runlevel change mechanism
 sysvinit   - System-V-like init utilities
 sysvinit-utils - System-V-like utilities
Closes: 587162 606565 634514
Changes: 
 sysvinit (2.88dsf-13.12) unstable; urgency=low
 .
   * Non-maintainer upload.
   * 92_kfreebsd_ifdown.patch: Shut down network interfaces correctly on GNU/kFreeBSD.
     Thanks Guillem.  (Closes: #606565)
   * Replace `ttyd' with `cuau' in inittab for GNU/kFreeBSD.  Thanks Tuco.
     (Closes: #587162)
   * Use linux-any in debian/control to avoid hardcoded lists of non-Linux
     arches.  (Closes: #634514)
Checksums-Sha1: 
 3751344e95a201641d282656489fbfb5a939d735 1613 sysvinit_2.88dsf-13.12.dsc
 61e760819dd5ca9c401175b5e6e83321e718d47c 179752 sysvinit_2.88dsf-13.12.diff.gz
 6dec17d01d13c1624ff6c17863323639c63cf4f8 117552 sysvinit_2.88dsf-13.12_kfreebsd-i386.deb
 25a6461ffc3ec9a3a75208a666f5b82370ef2c0e 121072 sysvinit-utils_2.88dsf-13.12_kfreebsd-i386.deb
 f648ab91e78965a84109dc748d280dce602573a0 76350 initscripts_2.88dsf-13.12_kfreebsd-i386.deb
 97f106b04567ad0a2e51612d7684e15ba59b81a3 78794 sysv-rc_2.88dsf-13.12_all.deb
Checksums-Sha256: 
 51f89bd14c4e1ef72831a56b3780b8edf7fe2f557ba4db9b3da5642bae1071a9 1613 sysvinit_2.88dsf-13.12.dsc
 de078e4103322bac14a2720e500b9e9f5992da245b4e8a21aa52f03aecd9a1dd 179752 sysvinit_2.88dsf-13.12.diff.gz
 5ddf4874918a678803db489ece57c5bc3b38d2ccca115b14297ea5df6450553f 117552 sysvinit_2.88dsf-13.12_kfreebsd-i386.deb
 d006cacba15fc3d22f48fc1abb04038f60b1ce732c9c278af28add597a818489 121072 sysvinit-utils_2.88dsf-13.12_kfreebsd-i386.deb
 295a979f7c133a0ac3adbce480585091e4808e8c79db469c7c40fcbff7be56d8 76350 initscripts_2.88dsf-13.12_kfreebsd-i386.deb
 6d8c1dce76f0595771cd97c41e268efa47678f453f41da2b2090b6ad39b5e271 78794 sysv-rc_2.88dsf-13.12_all.deb
Files: 
 9da323d8a42d5eb625438a3c8609c085 1613 admin required sysvinit_2.88dsf-13.12.dsc
 77b59a1f105dc00d6b896a3e5b0178e0 179752 admin required sysvinit_2.88dsf-13.12.diff.gz
 6368510731a644befd55bf18f42cd159 117552 admin required sysvinit_2.88dsf-13.12_kfreebsd-i386.deb
 3ce458677f8337599ff9b18eb6992061 121072 admin required sysvinit-utils_2.88dsf-13.12_kfreebsd-i386.deb
 cb9af135043cdf8b76a508fc91260398 76350 admin required initscripts_2.88dsf-13.12_kfreebsd-i386.deb
 dfaf145808331dbe9a2b7e46438f9fea 78794 admin required sysv-rc_2.88dsf-13.12_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/kFreeBSD)

iEYEARECAAYFAk6Yra4ACgkQC19io6rUCv/edACfd9Nitok4Ao+bMSBhkvS2jSHm
80AAn0TNIJ059aNn9A6s7b+DqCyKCsfX
=53SM
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 22 Nov 2011 07:33:14 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 00:43:34 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.