Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet6 "something odd happens" is not a useful error m...



details:   https://anonhg.NetBSD.org/src/rev/7bc57ad80e35
branches:  trunk
changeset: 336205:7bc57ad80e35
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Feb 17 15:14:28 2015 +0000

description:
"something odd happens" is not a useful error message.

diffstat:

 sys/netinet6/nd6.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r 8de826a77a43 -r 7bc57ad80e35 sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c        Tue Feb 17 11:51:04 2015 +0000
+++ b/sys/netinet6/nd6.c        Tue Feb 17 15:14:28 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nd6.c,v 1.156 2014/12/16 11:42:27 roy Exp $    */
+/*     $NetBSD: nd6.c,v 1.157 2015/02/17 15:14:28 christos Exp $       */
 /*     $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $   */
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.156 2014/12/16 11:42:27 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.157 2015/02/17 15:14:28 christos Exp $");
 
 #include "bridge.h"
 #include "carp.h"
@@ -2386,7 +2386,13 @@
                return 0;
        }
        if (rt->rt_gateway->sa_family != AF_LINK) {
-               printf("%s: something odd happens\n", __func__);
+               char gbuf[256];
+               char dbuf[LINK_ADDRSTRLEN];
+               sockaddr_format(rt->rt_gateway, gbuf, sizeof(gbuf));
+               printf("%s: bad gateway address type %s for dst %s"
+                   " through interface %s\n", __func__, gbuf, 
+                   IN6_PRINT(dbuf, &satocsin6(dst)->sin6_addr),
+                   if_name(ifp));
                m_freem(m);
                return 0;
        }



Home | Main Index | Thread Index | Old Index