Bug#600334: freeze exception for babeld/1.0.2-1
Package: release.debian.org
Severity: normal
User: release.debian.org@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 <glondu@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 IN
THE SOFTWARE.
*/
-#if defined __GNUC__
+#if defined(i386) || defined(__mc68020__) || defined(__x86_64__)
+#define DO_NTOHS(_d, _s) do { _d = ntohs(*(unsigned short*)(_s)); } while(0)
+#define DO_NTOHL(_d, _s) do { _d = ntohl(*(unsigned*)(_s)); } while(0)
+#define DO_HTONS(_d, _s) do { *(unsigned short*)(_d) = htons(_s); } while(0)
+#define DO_HTONL(_d, _s) do { *(unsigned*)(_d) = htonl(_s); } while(0)
+/* Some versions of gcc seem to be buggy, and ignore the packed attribute.
+ Disable this code until the issue is clarified. */
+/* #elif defined __GNUC__*/
+#elif 0
struct __us { unsigned short x __attribute__((packed)); };
#define DO_NTOHS(_d, _s) \
do { _d = ntohs(((const struct __us*)(_s))->x); } while(0)
Reply to: