svn commit: r287477 - head/sys/netinet6
Alexander V. Chernikov
melifaro at FreeBSD.org
Sat Sep 5 05:54:11 UTC 2015
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 *);
More information about the svn-src-head
mailing list