Deleted Added
full compact
nd6.c (287610) nd6.c (287789)
1/*-
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $KAME: nd6.c,v 1.144 2001/05/24 07:44:00 itojun Exp $
30 */
31
32#include <sys/cdefs.h>
1/*-
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $KAME: nd6.c,v 1.144 2001/05/24 07:44:00 itojun Exp $
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/netinet6/nd6.c 287610 2015-09-10 06:29:18Z hrs $");
33__FBSDID("$FreeBSD: head/sys/netinet6/nd6.c 287789 2015-09-14 16:48:19Z melifaro $");
34
35#include "opt_inet.h"
36#include "opt_inet6.h"
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/callout.h>
41#include <sys/malloc.h>

--- 2198 unchanged lines hidden (view full) ---

2240 LLE_WUNLOCK(ln);
2241 if (ln_tmp != NULL)
2242 llentry_free(ln_tmp);
2243
2244 return (0);
2245}
2246
2247/*
34
35#include "opt_inet.h"
36#include "opt_inet6.h"
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/callout.h>
41#include <sys/malloc.h>

--- 2198 unchanged lines hidden (view full) ---

2240 LLE_WUNLOCK(ln);
2241 if (ln_tmp != NULL)
2242 llentry_free(ln_tmp);
2243
2244 return (0);
2245}
2246
2247/*
2248 * Removes ALL lle records for interface address prefix.
2249 * XXXME: That's probably not we really want to do, we need
2250 * to remove address record only and keep other records
2251 * until we determine if given prefix is really going
2252 * to be removed.
2248 * Removes either all lle entries for given @ia, or lle
2249 * corresponding to @ia address.
2253 */
2254void
2250 */
2251void
2255nd6_rem_ifa_lle(struct in6_ifaddr *ia)
2252nd6_rem_ifa_lle(struct in6_ifaddr *ia, int all)
2256{
2257 struct sockaddr_in6 mask, addr;
2253{
2254 struct sockaddr_in6 mask, addr;
2255 struct sockaddr *saddr, *smask;
2258 struct ifnet *ifp;
2259
2260 ifp = ia->ia_ifa.ifa_ifp;
2261 memcpy(&addr, &ia->ia_addr, sizeof(ia->ia_addr));
2262 memcpy(&mask, &ia->ia_prefixmask, sizeof(ia->ia_prefixmask));
2256 struct ifnet *ifp;
2257
2258 ifp = ia->ia_ifa.ifa_ifp;
2259 memcpy(&addr, &ia->ia_addr, sizeof(ia->ia_addr));
2260 memcpy(&mask, &ia->ia_prefixmask, sizeof(ia->ia_prefixmask));
2263 lltable_prefix_free(AF_INET6, (struct sockaddr *)&addr,
2264 (struct sockaddr *)&mask, LLE_STATIC);
2261 saddr = (struct sockaddr *)&addr;
2262 smask = (struct sockaddr *)&mask;
2263
2264 if (all != 0)
2265 lltable_prefix_free(AF_INET6, saddr, smask, LLE_STATIC);
2266 else
2267 lltable_delete_addr(LLTABLE6(ifp), LLE_IFADDR, saddr);
2265}
2266
2267/*
2268 * the callers of this function need to be re-worked to drop
2269 * the lle lock, drop here for now
2270 */
2271int
2272nd6_storelladdr(struct ifnet *ifp, struct mbuf *m,

--- 179 unchanged lines hidden ---
2268}
2269
2270/*
2271 * the callers of this function need to be re-worked to drop
2272 * the lle lock, drop here for now
2273 */
2274int
2275nd6_storelladdr(struct ifnet *ifp, struct mbuf *m,

--- 179 unchanged lines hidden ---