From 3e1524c83e71a2bca2e8caa4e42e8054d09cd16d Mon Sep 17 00:00:00 2001 From: melifaro Date: Sat, 5 Sep 2015 05:54:09 +0000 Subject: [PATCH] Make in6ifa_ifpwithaddr() take const param. Remove unneded DECONST from in6_lltable_rtcheck(). --- sys/netinet6/in6.c | 5 ++--- sys/netinet6/in6_var.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 0242f8d43cce..af6475f6f3a1 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1518,7 +1518,7 @@ in6ifa_ifwithaddr(const struct in6_addr *addr, uint32_t zoneid) * ifaddr is returned referenced. */ struct in6_ifaddr * -in6ifa_ifpwithaddr(struct ifnet *ifp, struct in6_addr *addr) +in6ifa_ifpwithaddr(struct ifnet *ifp, const struct in6_addr *addr) { struct ifaddr *ifa; @@ -2138,8 +2138,7 @@ in6_lltable_rtcheck(struct ifnet *ifp, * Create an ND6 cache for an IPv6 neighbor * that is not covered by our own prefix. */ - /* XXX ifaof_ifpforaddr should take a const param */ - ifa = ifaof_ifpforaddr(__DECONST(struct sockaddr *, l3addr), ifp); + ifa = ifaof_ifpforaddr(l3addr, ifp); if (ifa != NULL) { ifa_free(ifa); if (rt != NULL) diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index 4e3646a0317a..4d39a5eb0e70 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -808,7 +808,7 @@ int in6_domifmtu(struct ifnet *); void in6_setmaxmtu(void); int in6_if2idlen(struct ifnet *); struct in6_ifaddr *in6ifa_ifpforlinklocal(struct ifnet *, int); -struct in6_ifaddr *in6ifa_ifpwithaddr(struct ifnet *, struct in6_addr *); +struct in6_ifaddr *in6ifa_ifpwithaddr(struct ifnet *, const struct in6_addr *); struct in6_ifaddr *in6ifa_ifwithaddr(const struct in6_addr *, uint32_t); struct in6_ifaddr *in6ifa_llaonifp(struct ifnet *); int in6_addr2zoneid(struct ifnet *, struct in6_addr *, u_int32_t *);