Deleted Added
full compact
if.c (193166) if.c (193232)
1/*-
2 * Copyright (c) 1980, 1986, 1993
3 * The Regents of the University of California. 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

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

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
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 * @(#)if.c 8.5 (Berkeley) 1/9/95
1/*-
2 * Copyright (c) 1980, 1986, 1993
3 * The Regents of the University of California. 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

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

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
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 * @(#)if.c 8.5 (Berkeley) 1/9/95
30 * $FreeBSD: head/sys/net/if.c 193166 2009-05-31 12:10:04Z zec $
30 * $FreeBSD: head/sys/net/if.c 193232 2009-06-01 15:49:42Z bz $
31 */
32
33#include "opt_compat.h"
34#include "opt_inet6.h"
35#include "opt_inet.h"
36#include "opt_route.h"
37#include "opt_mac.h"
38#include "opt_carp.h"

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

996 /*
997 * Delete all remaining routes using this interface
998 * Unfortuneatly the only way to do this is to slog through
999 * the entire routing table looking for routes which point
1000 * to this interface...oh well...
1001 */
1002 for (i = 1; i <= AF_MAX; i++) {
1003 for (j = 0; j < rt_numfibs; j++) {
31 */
32
33#include "opt_compat.h"
34#include "opt_inet6.h"
35#include "opt_inet.h"
36#include "opt_route.h"
37#include "opt_mac.h"
38#include "opt_carp.h"

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

996 /*
997 * Delete all remaining routes using this interface
998 * Unfortuneatly the only way to do this is to slog through
999 * the entire routing table looking for routes which point
1000 * to this interface...oh well...
1001 */
1002 for (i = 1; i <= AF_MAX; i++) {
1003 for (j = 0; j < rt_numfibs; j++) {
1004 if ((rnh = V_rt_tables[j][i]) == NULL)
1004 rnh = rt_tables_get_rnh(j, i);
1005 if (rnh == NULL)
1005 continue;
1006 RADIX_NODE_HEAD_LOCK(rnh);
1007 (void) rnh->rnh_walktree(rnh, if_rtdel, ifp);
1008 RADIX_NODE_HEAD_UNLOCK(rnh);
1009 }
1010 }
1011
1012 /* Announce that the interface is gone. */

--- 2189 unchanged lines hidden ---
1006 continue;
1007 RADIX_NODE_HEAD_LOCK(rnh);
1008 (void) rnh->rnh_walktree(rnh, if_rtdel, ifp);
1009 RADIX_NODE_HEAD_UNLOCK(rnh);
1010 }
1011 }
1012
1013 /* Announce that the interface is gone. */

--- 2189 unchanged lines hidden ---