diff options
-rw-r--r-- | usr.sbin/ospf6d/log.c | 31 | ||||
-rw-r--r-- | usr.sbin/ospf6d/log.h | 3 |
2 files changed, 2 insertions, 32 deletions
diff --git a/usr.sbin/ospf6d/log.c b/usr.sbin/ospf6d/log.c index 2e34697b5cb..d010d18736d 100644 --- a/usr.sbin/ospf6d/log.c +++ b/usr.sbin/ospf6d/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.7 2011/08/20 19:02:28 sthen Exp $ */ +/* $OpenBSD: log.c,v 1.8 2012/09/19 19:15:27 bluhm Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -180,41 +180,12 @@ const char * log_in6addr(const struct in6_addr *addr) { struct sockaddr_in6 sa_in6; - u_int16_t tmp16; bzero(&sa_in6, sizeof(sa_in6)); sa_in6.sin6_len = sizeof(sa_in6); sa_in6.sin6_family = AF_INET6; memcpy(&sa_in6.sin6_addr, addr, sizeof(sa_in6.sin6_addr)); - /* XXX thanks, KAME, for this ugliness... adopted from route/show.c */ - if (IN6_IS_ADDR_LINKLOCAL(&sa_in6.sin6_addr) || - IN6_IS_ADDR_MC_LINKLOCAL(&sa_in6.sin6_addr)) { - memcpy(&tmp16, &sa_in6.sin6_addr.s6_addr[2], sizeof(tmp16)); - sa_in6.sin6_scope_id = ntohs(tmp16); - sa_in6.sin6_addr.s6_addr[2] = 0; - sa_in6.sin6_addr.s6_addr[3] = 0; - } - - return (log_sockaddr(&sa_in6)); -} - -const char * -log_in6addr_scope(const struct in6_addr *addr, unsigned int ifindex) -{ - struct sockaddr_in6 sa_in6; - - bzero(&sa_in6, sizeof(sa_in6)); - sa_in6.sin6_len = sizeof(sa_in6); - sa_in6.sin6_family = AF_INET6; - memcpy(&sa_in6.sin6_addr, addr, sizeof(sa_in6.sin6_addr)); - - /* XXX thanks, IPv6 & KAME, for this ugliness... */ - if (IN6_IS_ADDR_LINKLOCAL(&sa_in6.sin6_addr) || - IN6_IS_ADDR_MC_LINKLOCAL(&sa_in6.sin6_addr)) { - sa_in6.sin6_scope_id = ifindex; - } - return (log_sockaddr(&sa_in6)); } diff --git a/usr.sbin/ospf6d/log.h b/usr.sbin/ospf6d/log.h index 92c2d67e719..d3cf6de77aa 100644 --- a/usr.sbin/ospf6d/log.h +++ b/usr.sbin/ospf6d/log.h @@ -1,4 +1,4 @@ -/* $OpenBSD: log.h,v 1.5 2009/12/22 17:45:47 claudio Exp $ */ +/* $OpenBSD: log.h,v 1.6 2012/09/19 19:15:27 bluhm Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -32,7 +32,6 @@ void fatal(const char *) __dead; void fatalx(const char *) __dead; const char *log_in6addr(const struct in6_addr *); -const char *log_in6addr_scope(const struct in6_addr *, unsigned int); const char *log_rtr_id(u_int32_t); const char *log_sockaddr(void *); |