Your message dated Sun, 13 Nov 2011 23:18:49 +0000
with message-id <[email protected]>
and subject line Bug#646291: fixed in ifupdown 0.7~beta2
has caused the Debian Bug report #646291,
regarding please use FreeBSD route on Debian GNU/kFreeBSD
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
646291: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646291
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ifupdown
Version: 0.6.10
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: kfreebsd

Debian GNU/kFreeBSD provides two route implementations, /lib/freebsd/route
which is the FreeBSD version of route, and /sbin/route which is a shell
wrapper that attempts to provide a Linux-like CLI.

As the /sbin/route wrapper is very incomplete / unreliable, and applications
tend to expect /sbin/route to provide FreeBSD CLI more often than not, in
the near future we're going to install FreeBSD route into /sbin/route (and
remove the wrapper or put it elsewhere). See:
  http://lists.debian.org/debian-bsd/2011/10/msg00242.html

Attached patch adjusts ifupdown to use FreeBSD route CLI when running on
GNU/kFreeBSD, and to use /lib/freebsd/route instead of /sbin/route.  The
latter is meant to be temporary and allow us to do this switch without
causing any breakage.

-- System Information:
Debian Release: 6.0.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 8.1-1-amd64
Locale: LANG=ca_AD.UTF-8, LC_CTYPE=ca_AD.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages ifupdown depends on:
ii  freebsd-net-tools [net- 8.1-5            FreeBSD networking tools
ii  libc0.1                 2.11.2-10        Embedded GNU C Library: Shared lib
ii  lsb-base                3.2-23.2squeeze1 Linux Standard Base 3.2 init scrip

ifupdown recommends no packages.

Versions of packages ifupdown suggests:
pn  iproute             <none>               (no description available)
ii  isc-dhcp-client [dh 4.1.1-P1-15+squeeze3 ISC DHCP client
pn  ppp                 <none>               (no description available)

-- no debconf information
=== modified file 'ifupdown.nw'
--- ifupdown.nw 2011-10-22 21:18:54 +0000
+++ ifupdown.nw 2011-10-22 21:49:51 +0000
@@ -107,13 +107,13 @@ We shall begin with the template for the
 <<Makefile>>=
 <<make options>>
 
-CFILES := addrfam.c execute.c config.c main.c archlinux.c
-HFILES := header.h archlinux.h
+CFILES := addrfam.c execute.c config.c main.c archlinux.c archkfreebsd.c
+HFILES := header.h archlinux.h archkfreebsd.h
 PERLFILES := defn2c.pl defn2man.pl
 DEFNFILES := inet.defn ipx.defn inet6.defn
 
 OBJ := main.o addrfam.o execute.o config.o \
-       $(patsubst %.defn,%.o,$(DEFNFILES)) archlinux.o
+       $(patsubst %.defn,%.o,$(DEFNFILES)) archlinux.o archkfreebsd.o
 
 MAN := $(patsubst %.defn,%.man,$(DEFNFILES))
 
@@ -3818,6 +3818,7 @@ interfaces up and down.
 unsigned int mylinuxver();
 unsigned int mylinux(int,int,int);
 int execable(char *);
+int islinux();
 @
 
 <<archlinux.c>>=
@@ -3863,6 +3864,30 @@ int execable(char *program) {
        }
        return 0;
 }
+
+int islinux() {
+#ifdef __linux__
+       return 1;
+#else
+       return 0;
+#endif
+}
+@ 
+
+<<archkfreebsd.h>>=
+int iskfreebsd();
+@
+
+<<archkfreebsd.c>>=
+#include "archkfreebsd.h"
+
+int iskfreebsd() {
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+       return 1;
+#else
+       return 0;
+#endif
+}
 @ 
 
 \subsection{IPv4 Address Family}
@@ -3878,6 +3903,7 @@ extern address_family addr_inet;
 <<inet.defn>>=
 address_family inet
 architecture linux
+architecture kfreebsd
 
 <<inet methods>>
 @ 
@@ -3925,10 +3951,17 @@ method static
        up
     route add -net %network%  \
         if ( mylinuxver() < mylinux(2,1,100) )
-    [[ route add default gw %gateway% [[metric %metric%]] %iface% ]]
+    [[ /lib/freebsd/route add default %gateway% ]] \
+        if ( iskfreebsd() )
+    [[ route add default gw %gateway% [[metric %metric%]] %iface% ]] \
+        elsif ( 1 )
+
 
   down
-    [[ route del default gw %gateway% [[metric %metric%]] %iface% ]]
+    [[ /lib/freebsd/route del default %gateway% ]] \
+        if ( iskfreebsd() )
+    [[ route del default gw %gateway% [[metric %metric%]] %iface% ]] \
+        elsif ( 1 )
     ifconfig %iface% down
 @
 
@@ -4058,6 +4091,7 @@ extern address_family addr_inet6;
 <<inet6.defn>>=
 address_family inet6
 architecture linux
+architecture kfreebsd
 
 method loopback
   description
@@ -4086,7 +4120,10 @@ method static
     modprobe -q net-pf-10 > /dev/null 2>&1 || true # ignore failure.
     ifconfig %iface% [[media %media%]] [[hw %hwaddress%]] [[mtu %mtu%]] up
     ifconfig %iface% add %address%/%netmask%
-    [[ route -A inet6 add ::/0 gw %gateway% %iface% ]] 
+    [[ /lib/freebsd/route add -inet6 ::/0 %gateway% ]] \
+        if ( iskfreebsd() )
+    [[ route -A inet6 add ::/0 gw %gateway% %iface% ]] \
+        elsif ( 1 )
 
   down
     ifconfig %iface% down


--- End Message ---
--- Begin Message ---
Source: ifupdown
Source-Version: 0.7~beta2

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

ifupdown_0.7~beta2.dsc
  to main/i/ifupdown/ifupdown_0.7~beta2.dsc
ifupdown_0.7~beta2.tar.gz
  to main/i/ifupdown/ifupdown_0.7~beta2.tar.gz
ifupdown_0.7~beta2_amd64.deb
  to main/i/ifupdown/ifupdown_0.7~beta2_amd64.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 [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andrew O. Shadura <[email protected]> (supplier of updated ifupdown 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 [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Format: 1.8
Date: Sun, 13 Nov 2011 23:20:11 +0100
Source: ifupdown
Binary: ifupdown
Architecture: source amd64
Version: 0.7~beta2
Distribution: experimental
Urgency: low
Maintainer: Andrew O. Shadura <[email protected]>
Changed-By: Andrew O. Shadura <[email protected]>
Description: 
 ifupdown   - high level tools to configure network interfaces
Closes: 255222 346459 477650 502630 534181 545250 547587 572396 639612 645813 
646291
Changes: 
 ifupdown (0.7~beta2) experimental; urgency=low
 .
   * Put interfaces down in the reverse order than they were
     brought up (Closes: #477650).
   * Fix postinst issues with loopback interface naming
     (Closes: #572396, #545250).
   * Remove old .dpkg-old symlink (Closes: #639612).
   * Document some details on processing /etc/network/if-*.d directories.
   * Terminate ifup if it's still running when doing ifdown.
   * Finally migrate to /run/network.
   * Use FHS names for wvdial pid files (Closes: #255222).
   * Stop on run-parts failure (Closes: #547587).
   * Execute scripts before interface options on *-down (Closes: #346459).
   * Display missing variable name in the error message; make it also a bit
     less obscure (Closes: #502630).
   * Fix wvdial options description (Closes: #534181).
   * Specify interface label (Closes: #645813).
   * Add address scope option for static IPv4 and IPv6 setups.
   * Use FreeBSD version of route, thanks to Robert Millan (Closes: #646291).
Checksums-Sha1: 
 afb0ebcaa966944462256bb431b20d9f4da3a2a1 962 ifupdown_0.7~beta2.dsc
 c1cff6dbc09c9f367c817738e1b016b59a307807 91224 ifupdown_0.7~beta2.tar.gz
 a90a379eedc8b4f93ef871d057c6e4e0887e70cd 53104 ifupdown_0.7~beta2_amd64.deb
Checksums-Sha256: 
 0d9354286619288f731f00618b58dfdcabc2c269ea5accc0f59af40757f2e2bf 962 
ifupdown_0.7~beta2.dsc
 8ea81e6a3277c386fa355a4d6fe2c470ef3a21c945c9b50611272aa749792e10 91224 
ifupdown_0.7~beta2.tar.gz
 b247b57b54f3d243ee298e74c3b2f036b7b6239eaff42253e40ef58a12e18087 53104 
ifupdown_0.7~beta2_amd64.deb
Files: 
 11259fd73d98990eccc2058f40024dbd 962 admin important ifupdown_0.7~beta2.dsc
 360f783c12167f1eb4999bbb64d46c2c 91224 admin important 
ifupdown_0.7~beta2.tar.gz
 71e375d7a197fb498bf52af4de601863 53104 admin important 
ifupdown_0.7~beta2_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEAREDAAYFAk7ATs0ACgkQVcFcaSW/uEg63gCeK6rsNkIRZlCuTViK4gApehBu
uTwAnAynv7l+sZl5sZRxZIalYbEUUkbF
=bLx7
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to