Deleted Added
full compact
if_gre.c (274289) if_gre.c (276215)
1/*-
2 * Copyright (c) 1998 The NetBSD Foundation, Inc.
3 * Copyright (c) 2014 Andrey V. Elsukov <ae@FreeBSD.org>
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to The NetBSD Foundation
7 * by Heiko W.Rupp <hwr@pilhuhn.de>
8 *

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

28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE.
31 *
32 * $NetBSD: if_gre.c,v 1.49 2003/12/11 00:22:29 itojun Exp $
33 */
34
35#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1998 The NetBSD Foundation, Inc.
3 * Copyright (c) 2014 Andrey V. Elsukov <ae@FreeBSD.org>
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to The NetBSD Foundation
7 * by Heiko W.Rupp <hwr@pilhuhn.de>
8 *

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

28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE.
31 *
32 * $NetBSD: if_gre.c,v 1.49 2003/12/11 00:22:29 itojun Exp $
33 */
34
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD: head/sys/net/if_gre.c 274289 2014-11-08 14:41:32Z bz $");
36__FBSDID("$FreeBSD: head/sys/net/if_gre.c 276215 2014-12-25 21:32:37Z ae $");
37
38#include "opt_inet.h"
39#include "opt_inet6.h"
40
41#include <sys/param.h>
42#include <sys/jail.h>
43#include <sys/kernel.h>
44#include <sys/lock.h>

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

114static int gre_output(struct ifnet *, struct mbuf *,
115 const struct sockaddr *, struct route *);
116
117static void gre_updatehdr(struct gre_softc *);
118static int gre_set_tunnel(struct ifnet *, struct sockaddr *,
119 struct sockaddr *);
120static void gre_delete_tunnel(struct ifnet *);
121
37
38#include "opt_inet.h"
39#include "opt_inet6.h"
40
41#include <sys/param.h>
42#include <sys/jail.h>
43#include <sys/kernel.h>
44#include <sys/lock.h>

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

114static int gre_output(struct ifnet *, struct mbuf *,
115 const struct sockaddr *, struct route *);
116
117static void gre_updatehdr(struct gre_softc *);
118static int gre_set_tunnel(struct ifnet *, struct sockaddr *,
119 struct sockaddr *);
120static void gre_delete_tunnel(struct ifnet *);
121
122int gre_input(struct mbuf **, int *, int);
123#ifdef INET
124extern int in_gre_attach(struct gre_softc *);
125extern int in_gre_output(struct mbuf *, int, int);
126#endif
127#ifdef INET6
128extern int in6_gre_attach(struct gre_softc *);
129extern int in6_gre_output(struct mbuf *, int, int);
130#endif
131
132SYSCTL_DECL(_net_link);
133static SYSCTL_NODE(_net_link, IFT_TUNNEL, gre, CTLFLAG_RW, 0,
134 "Generic Routing Encapsulation");
135#ifndef MAX_GRE_NEST
136/*
137 * This macro controls the default upper limitation on nesting of gre tunnels.
138 * Since, setting a large value to this macro with a careless configuration
139 * may introduce system crash, we don't allow any nestings by default.

--- 832 unchanged lines hidden ---
122SYSCTL_DECL(_net_link);
123static SYSCTL_NODE(_net_link, IFT_TUNNEL, gre, CTLFLAG_RW, 0,
124 "Generic Routing Encapsulation");
125#ifndef MAX_GRE_NEST
126/*
127 * This macro controls the default upper limitation on nesting of gre tunnels.
128 * Since, setting a large value to this macro with a careless configuration
129 * may introduce system crash, we don't allow any nestings by default.

--- 832 unchanged lines hidden ---