Bug#600334: freeze exception for babeld/1.0.2-1

2010-10-25 Thread Julien Cristau
On Sat, Oct 16, 2010 at 09:38:18 +0200, Stéphane Glondu wrote:

 There has been a recent new bugfix release of babeld that fixes a
 possible crash on mips architectures. Attached is the diff of what I
 am planning to upload against the current version in unstable (and
 testing).
 
Are you sure the bug affected debian in the first place?

Cheers,
Julien


signature.asc
Description: Digital signature


Bug#600334: freeze exception for babeld/1.0.2-1

2010-10-25 Thread Stéphane Glondu
Le 25/10/2010 20:54, Julien Cristau a écrit :
 There has been a recent new bugfix release of babeld that fixes a
 possible crash on mips architectures. Attached is the diff of what I
 am planning to upload against the current version in unstable (and
 testing).

 Are you sure the bug affected debian in the first place?

No.

-- 
Stéphane




--
To UNSUBSCRIBE, email to debian-release-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4cc5d490.7090...@glondu.net



Bug#600334: freeze exception for babeld/1.0.2-1

2010-10-16 Thread Stéphane Glondu
Package: release.debian.org
Severity: normal
User: release.debian@packages.debian.org
Usertags: freeze-exception

Hello,

There has been a recent new bugfix release of babeld that fixes a
possible crash on mips architectures. Attached is the diff of what I
am planning to upload against the current version in unstable (and
testing).

Can it be granted a freeze exception?


Cheers,

-- 
Stéphane

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff --git a/CHANGES b/CHANGES
index 8a138da..14fc816 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+1 October 2010: babeld 1.0.2:
+
+  * Worked around a gcc bug that would cause assertion failures on MIPS.
+
 2 May 2010: babeld 1.0.1:
 
   * Fixed a bug that could cause input filters to be ignored.
diff --git a/debian/changelog b/debian/changelog
index 56422c2..ec21adc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+babeld (1.0.2-1) UNRELEASED; urgency=low
+
+  * New upstream release
+
+ -- Stéphane Glondu glo...@debian.org  Sat, 16 Oct 2010 09:01:24 +0200
+
 babeld (1.0.1-1) unstable; urgency=low
 
   * New upstream release
diff --git a/route.c b/route.c
index b1a90db..3997af5 100644
--- a/route.c
+++ b/route.c
@@ -234,7 +234,7 @@ switch_routes(struct route *old, struct route *new)
 local_notify_route(new, LOCAL_CHANGE);
 }
 
-void
+static void
 change_route_metric(struct route *route, unsigned newmetric)
 {
 int old, new;
@@ -262,6 +262,13 @@ change_route_metric(struct route *route, unsigned newmetric)
 local_notify_route(route, LOCAL_CHANGE);
 }
 
+static void
+retract_route(struct route *route)
+{
+route-refmetric = INFINITY;
+change_route_metric(route, INFINITY);
+}
+
 int
 route_feasible(struct route *route)
 {
@@ -326,31 +333,30 @@ find_best_route(const unsigned char *prefix, unsigned char plen, int feasible,
 void
 update_route_metric(struct route *route)
 {
-int oldmetric;
-int newmetric;
+int oldmetric = route_metric(route);
 
-oldmetric = route_metric(route);
 if(route_expired(route)) {
 if(route-refmetric  INFINITY) {
 route-seqno = seqno_plus(route-src-seqno, 1);
-route-refmetric = INFINITY;
+retract_route(route);
+if(oldmetric  INFINITY)
+route_changed(route, route-src, oldmetric);
 }
-newmetric = INFINITY;
 } else {
 struct neighbour *neigh = route-neigh;
 int add_metric = input_filter(route-src-id,
   route-src-prefix, route-src-plen,
   neigh-address,
   neigh-network-ifindex);
-newmetric = MIN(route-refmetric +
-add_metric +
-neighbour_cost(route-neigh),
-INFINITY);
-}
-
-if(newmetric != oldmetric) {
-change_route_metric(route, newmetric);
-route_changed(route, route-src, oldmetric);
+int newmetric = MIN(route-refmetric +
+add_metric +
+neighbour_cost(route-neigh),
+INFINITY);
+
+if(newmetric != oldmetric) {
+change_route_metric(route, newmetric);
+route_changed(route, route-src, oldmetric);
+}
 }
 }
 
@@ -572,10 +578,11 @@ retract_neighbour_routes(struct neighbour *neigh)
 i = 0;
 while(i  numroutes) {
 if(routes[i].neigh == neigh) {
-unsigned short oldmetric = route_metric(routes[i]);
-if(oldmetric != INFINITY) {
-change_route_metric(routes[i], INFINITY);
-route_changed(routes[i], routes[i].src, oldmetric);
+if(routes[i].refmetric != INFINITY) {
+unsigned short oldmetric = route_metric(routes[i]);
+retract_route(routes[i]);
+if(oldmetric != INFINITY)
+route_changed(routes[i], routes[i].src, oldmetric);
 }
 }
 i++;
diff --git a/route.h b/route.h
index 64fa3d2..72a1098 100644
--- a/route.h
+++ b/route.h
@@ -52,7 +52,6 @@ void flush_network_routes(struct network *net, int v4only);
 void install_route(struct route *route);
 void uninstall_route(struct route *route);
 void switch_route(struct route *old, struct route *new);
-void change_route_metric(struct route *route, unsigned newmetric);
 int route_feasible(struct route *route);
 int route_old(struct route *route);
 int route_expired(struct route *route);
diff --git a/util.h b/util.h
index 62abb2b..d142018 100644
--- a/util.h
+++ b/util.h
@@ -20,7 +20,15 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS