nd6.c (c4dd3fe1089be9645e89be2a28c060a49469dc1b) | nd6.c (f6dfe47a145263dc5eb67fa4789925ab708709bc) |
---|---|
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 --- 177 unchanged lines hidden (view full) --- 186 for (i = 0; i < sizeof(all1_sa.sin6_addr); i++) 187 all1_sa.sin6_addr.s6_addr[i] = 0xff; 188 189 /* initialization of the default router list */ 190 TAILQ_INIT(&V_nd_defrouter); 191 /* start timer */ 192 callout_init(&V_nd6_slowtimo_ch, 0); 193 callout_reset(&V_nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL * hz, | 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 --- 177 unchanged lines hidden (view full) --- 186 for (i = 0; i < sizeof(all1_sa.sin6_addr); i++) 187 all1_sa.sin6_addr.s6_addr[i] = 0xff; 188 189 /* initialization of the default router list */ 190 TAILQ_INIT(&V_nd_defrouter); 191 /* start timer */ 192 callout_init(&V_nd6_slowtimo_ch, 0); 193 callout_reset(&V_nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL * hz, |
194 nd6_slowtimo, NULL); | 194 nd6_slowtimo, curvnet); |
195 196 nd6_init_done = 1; 197 198} 199 200struct nd_ifinfo * 201nd6_ifattach(struct ifnet *ifp) 202{ --- 385 unchanged lines hidden (view full) --- 588 589/* 590 * ND6 timer routine to expire default route list and prefix list 591 */ 592void 593nd6_timer(void *arg) 594{ 595 CURVNET_SET_QUIET((struct vnet *) arg); | 195 196 nd6_init_done = 1; 197 198} 199 200struct nd_ifinfo * 201nd6_ifattach(struct ifnet *ifp) 202{ --- 385 unchanged lines hidden (view full) --- 588 589/* 590 * ND6 timer routine to expire default route list and prefix list 591 */ 592void 593nd6_timer(void *arg) 594{ 595 CURVNET_SET_QUIET((struct vnet *) arg); |
596 INIT_VNET_INET6((struct vnet *) arg); | 596 INIT_VNET_INET6(curvnet); |
597 int s; 598 struct nd_defrouter *dr; 599 struct nd_prefix *pr; 600 struct in6_ifaddr *ia6, *nia6; 601 struct in6_addrlifetime *lt6; 602 603 callout_reset(&V_nd6_timer_ch, V_nd6_prune * hz, | 597 int s; 598 struct nd_defrouter *dr; 599 struct nd_prefix *pr; 600 struct in6_ifaddr *ia6, *nia6; 601 struct in6_addrlifetime *lt6; 602 603 callout_reset(&V_nd6_timer_ch, V_nd6_prune * hz, |
604 nd6_timer, NULL); | 604 nd6_timer, curvnet); |
605 606 /* expire default router list */ 607 s = splnet(); 608 dr = TAILQ_FIRST(&V_nd_defrouter); 609 while (dr) { 610 if (dr->expire && dr->expire < time_second) { 611 struct nd_defrouter *t; 612 t = TAILQ_NEXT(dr, dr_entry); --- 254 unchanged lines hidden (view full) --- 867 868/* 869 * the caller acquires and releases the lock on the lltbls 870 * Returns the llentry locked 871 */ 872struct llentry * 873nd6_lookup(struct in6_addr *addr6, int flags, struct ifnet *ifp) 874{ | 605 606 /* expire default router list */ 607 s = splnet(); 608 dr = TAILQ_FIRST(&V_nd_defrouter); 609 while (dr) { 610 if (dr->expire && dr->expire < time_second) { 611 struct nd_defrouter *t; 612 t = TAILQ_NEXT(dr, dr_entry); --- 254 unchanged lines hidden (view full) --- 867 868/* 869 * the caller acquires and releases the lock on the lltbls 870 * Returns the llentry locked 871 */ 872struct llentry * 873nd6_lookup(struct in6_addr *addr6, int flags, struct ifnet *ifp) 874{ |
875 INIT_VNET_INET6(curvnet); | |
876 struct sockaddr_in6 sin6; 877 struct llentry *ln; 878 int llflags = 0; 879 880 bzero(&sin6, sizeof(sin6)); 881 sin6.sin6_len = sizeof(struct sockaddr_in6); 882 sin6.sin6_family = AF_INET6; 883 sin6.sin6_addr = *addr6; --- 780 unchanged lines hidden (view full) --- 1664{ 1665 CURVNET_SET((struct vnet *) arg); 1666 INIT_VNET_NET((struct vnet *) arg); 1667 INIT_VNET_INET6((struct vnet *) arg); 1668 struct nd_ifinfo *nd6if; 1669 struct ifnet *ifp; 1670 1671 callout_reset(&V_nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL * hz, | 875 struct sockaddr_in6 sin6; 876 struct llentry *ln; 877 int llflags = 0; 878 879 bzero(&sin6, sizeof(sin6)); 880 sin6.sin6_len = sizeof(struct sockaddr_in6); 881 sin6.sin6_family = AF_INET6; 882 sin6.sin6_addr = *addr6; --- 780 unchanged lines hidden (view full) --- 1663{ 1664 CURVNET_SET((struct vnet *) arg); 1665 INIT_VNET_NET((struct vnet *) arg); 1666 INIT_VNET_INET6((struct vnet *) arg); 1667 struct nd_ifinfo *nd6if; 1668 struct ifnet *ifp; 1669 1670 callout_reset(&V_nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL * hz, |
1672 nd6_slowtimo, NULL); | 1671 nd6_slowtimo, curvnet); |
1673 IFNET_RLOCK(); 1674 for (ifp = TAILQ_FIRST(&V_ifnet); ifp; 1675 ifp = TAILQ_NEXT(ifp, if_list)) { 1676 nd6if = ND_IFINFO(ifp); 1677 if (nd6if->basereachable && /* already initialized */ 1678 (nd6if->recalctm -= ND6_SLOWTIMER_INTERVAL) <= 0) { 1679 /* 1680 * Since reachable time rarely changes by router --- 556 unchanged lines hidden --- | 1672 IFNET_RLOCK(); 1673 for (ifp = TAILQ_FIRST(&V_ifnet); ifp; 1674 ifp = TAILQ_NEXT(ifp, if_list)) { 1675 nd6if = ND_IFINFO(ifp); 1676 if (nd6if->basereachable && /* already initialized */ 1677 (nd6if->recalctm -= ND6_SLOWTIMER_INTERVAL) <= 0) { 1678 /* 1679 * Since reachable time rarely changes by router --- 556 unchanged lines hidden --- |