Cleanup in_ifscrub(), which is just an entry to in_scrubprefix().

This commit is contained in:
Gleb Smirnoff 2013-11-01 10:18:41 +00:00
parent 0d168b8d36
commit 237bf7f773
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=257499
4 changed files with 7 additions and 18 deletions

View File

@ -142,7 +142,7 @@ static const struct netisr_handler arp_nh = {
#ifdef AF_INET
/*
* called by in_ifscrub to remove entry from the table when
* called by in_scrubprefix() to remove entry from the table when
* the interface goes away
*/
void

View File

@ -488,7 +488,7 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
* is the same as before, then the call is
* un-necessarily executed here.
*/
in_ifscrub(ifp, ia, LLE_STATIC);
in_scrubprefix(ia, LLE_STATIC);
ia->ia_sockmask = ifra->ifra_mask;
ia->ia_sockmask.sin_family = AF_INET;
ia->ia_subnetmask =
@ -497,7 +497,7 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
}
if ((ifp->if_flags & IFF_POINTOPOINT) &&
(ifra->ifra_dstaddr.sin_family == AF_INET)) {
in_ifscrub(ifp, ia, LLE_STATIC);
in_scrubprefix(ia, LLE_STATIC);
ia->ia_dstaddr = ifra->ifra_dstaddr;
maskIsNew = 1; /* We lie; but the effect's the same */
}
@ -523,9 +523,9 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
case SIOCDIFADDR:
/*
* in_ifscrub kills the interface route.
* in_scrubprefix() kills the interface route.
*/
in_ifscrub(ifp, ia, LLE_STATIC);
in_scrubprefix(ia, LLE_STATIC);
/*
* in_ifadown gets rid of all the rest of
@ -770,16 +770,6 @@ in_lifaddr_ioctl(struct socket *so, u_long cmd, caddr_t data,
return (EOPNOTSUPP); /*just for safety*/
}
/*
* Delete any existing route for an interface.
*/
void
in_ifscrub(struct ifnet *ifp, struct in_ifaddr *ia, u_int flags)
{
in_scrubprefix(ia, flags);
}
/*
* Initialize an interface's internet address
* and routing table entry.

View File

@ -412,7 +412,6 @@ int in_addprefix(struct in_ifaddr *, int);
int in_scrubprefix(struct in_ifaddr *, u_int);
void ip_input(struct mbuf *);
int in_ifadown(struct ifaddr *ifa, int);
void in_ifscrub(struct ifnet *, struct in_ifaddr *, u_int);
struct mbuf *ip_fastforward(struct mbuf *);
void *in_domifattach(struct ifnet *);
void in_domifdetach(struct ifnet *, void *);

View File

@ -736,9 +736,9 @@ rip_ctlinput(int cmd, struct sockaddr *sa, void *vip)
ifa_ref(&ia->ia_ifa);
IN_IFADDR_RUNLOCK();
/*
* in_ifscrub kills the interface route.
* in_scrubprefix() kills the interface route.
*/
in_ifscrub(ia->ia_ifp, ia, 0);
in_scrubprefix(ia, 0);
/*
* in_ifadown gets rid of all the rest of the
* routes. This is not quite the right thing