Date: Sat, 5 Sep 2015 05:54:10 +0000 (UTC) From: "Alexander V. Chernikov" <melifaro@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287477 - head/sys/netinet6 Message-ID: <201509050554.t855sA4e079454@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: melifaro Date: Sat Sep 5 05:54:09 2015 New Revision: 287477 URL: https://svnweb.freebsd.org/changeset/base/287477 Log: Make in6ifa_ifpwithaddr() take const param. Remove unneded DECONST from in6_lltable_rtcheck(). Modified: head/sys/netinet6/in6.c head/sys/netinet6/in6_var.h Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Sat Sep 5 05:33:20 2015 (r287476) +++ head/sys/netinet6/in6.c Sat Sep 5 05:54:09 2015 (r287477) @@ -1518,7 +1518,7 @@ in6ifa_ifwithaddr(const struct in6_addr * 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) Modified: head/sys/netinet6/in6_var.h ============================================================================== --- head/sys/netinet6/in6_var.h Sat Sep 5 05:33:20 2015 (r287476) +++ head/sys/netinet6/in6_var.h Sat Sep 5 05:54:09 2015 (r287477) @@ -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 *);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509050554.t855sA4e079454>