]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fixes bug in debug dumps
authorOndrej Zajicek <santiago@crfreenet.org>
Mon, 2 Mar 2015 08:42:44 +0000 (09:42 +0100)
committerOndrej Zajicek <santiago@crfreenet.org>
Mon, 2 Mar 2015 08:42:44 +0000 (09:42 +0100)
Using 'dump sockets' in IPv6 mode caused crash due to mismatched format string.

Thanks to Pavel Tvrdik for noticing it.

sysdep/unix/io.c

index bbb87ca92bbb3bb248afa3678b71f916036aa786..b4fec9cde0d50a1cdd66234a37fb5bd0303c50e6 100644 (file)
@@ -1106,7 +1106,7 @@ sk_dump(resource *r)
   sock *s = (sock *) r;
   static char *sk_type_names[] = { "TCP<", "TCP>", "TCP", "UDP", NULL, "IP", NULL, "MAGIC", "UNIX<", "UNIX", "DEL!" };
 
-  debug("(%s, ud=%p, sa=%08x, sp=%d, da=%08x, dp=%d, tos=%d, ttl=%d, if=%s)\n",
+  debug("(%s, ud=%p, sa=%I, sp=%d, da=%I, dp=%d, tos=%d, ttl=%d, if=%s)\n",
        sk_type_names[s->type],
        s->data,
        s->saddr,