Deleted Added
full compact
in6_rmx.c (193232) in6_rmx.c (193731)
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

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

68 * requested.
69 * 2) When such routes lose all their references, it arranges for them
70 * to be deleted in some random collection of circumstances, so that
71 * a large quantity of stale routing data is not kept in kernel memory
72 * indefinitely. See in6_rtqtimo() below for the exact mechanism.
73 */
74
75#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

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

68 * requested.
69 * 2) When such routes lose all their references, it arranges for them
70 * to be deleted in some random collection of circumstances, so that
71 * a large quantity of stale routing data is not kept in kernel memory
72 * indefinitely. See in6_rtqtimo() below for the exact mechanism.
73 */
74
75#include <sys/cdefs.h>
76__FBSDID("$FreeBSD: head/sys/netinet6/in6_rmx.c 193232 2009-06-01 15:49:42Z bz $");
76__FBSDID("$FreeBSD: head/sys/netinet6/in6_rmx.c 193731 2009-06-08 17:15:40Z zec $");
77
78#include "opt_route.h"
79
80#include <sys/param.h>
81#include <sys/systm.h>
82#include <sys/kernel.h>
83#include <sys/lock.h>
84#include <sys/sysctl.h>

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

107#include <netinet6/vinet6.h>
108
109#include <netinet/tcp.h>
110#include <netinet/tcp_seq.h>
111#include <netinet/tcp_timer.h>
112#include <netinet/tcp_var.h>
113
114extern int in6_inithead(void **head, int off);
77
78#include "opt_route.h"
79
80#include <sys/param.h>
81#include <sys/systm.h>
82#include <sys/kernel.h>
83#include <sys/lock.h>
84#include <sys/sysctl.h>

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

107#include <netinet6/vinet6.h>
108
109#include <netinet/tcp.h>
110#include <netinet/tcp_seq.h>
111#include <netinet/tcp_timer.h>
112#include <netinet/tcp_var.h>
113
114extern int in6_inithead(void **head, int off);
115#ifdef VIMAGE
116extern int in6_detachhead(void **head, int off);
117#endif
115
116#define RTPRF_OURS RTF_PROTO3 /* set on routes we manage */
117
118/*
119 * Do what we need to do when inserting a route.
120 */
121static struct radix_node *
122in6_addroute(void *v_arg, void *n_arg, struct radix_node_head *head,

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

459 rnh->rnh_addaddr = in6_addroute;
460 rnh->rnh_matchaddr = in6_matroute;
461 callout_init(&V_rtq_timer6, CALLOUT_MPSAFE);
462 callout_init(&V_rtq_mtutimer, CALLOUT_MPSAFE);
463 in6_rtqtimo(curvnet); /* kick off timeout first time */
464 in6_mtutimo(curvnet); /* kick off timeout first time */
465 return 1;
466}
118
119#define RTPRF_OURS RTF_PROTO3 /* set on routes we manage */
120
121/*
122 * Do what we need to do when inserting a route.
123 */
124static struct radix_node *
125in6_addroute(void *v_arg, void *n_arg, struct radix_node_head *head,

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

462 rnh->rnh_addaddr = in6_addroute;
463 rnh->rnh_matchaddr = in6_matroute;
464 callout_init(&V_rtq_timer6, CALLOUT_MPSAFE);
465 callout_init(&V_rtq_mtutimer, CALLOUT_MPSAFE);
466 in6_rtqtimo(curvnet); /* kick off timeout first time */
467 in6_mtutimo(curvnet); /* kick off timeout first time */
468 return 1;
469}
470
471#ifdef VIMAGE
472int
473in6_detachhead(void **head, int off)
474{
475 INIT_VNET_INET6(curvnet);
476
477 callout_drain(&V_rtq_timer6);
478 callout_drain(&V_rtq_mtutimer);
479 return (1);
480}
481#endif