Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net eliminate stf(4)'s dependency on gif(4).
details: https://anonhg.NetBSD.org/src/rev/0400c8c6bb81
branches: trunk
changeset: 347215:0400c8c6bb81
user: knakahara <knakahara%NetBSD.org@localhost>
date: Thu Aug 18 11:38:58 2016 +0000
description:
eliminate stf(4)'s dependency on gif(4).
stf(4) depends on not gif(4) but ip_encap.
diffstat:
sys/net/if_stf.c | 18 ++++--------------
sys/net/if_stf.h | 4 +++-
2 files changed, 7 insertions(+), 15 deletions(-)
diffs (82 lines):
diff -r 1a0ecfdd0dc7 -r 0400c8c6bb81 sys/net/if_stf.c
--- a/sys/net/if_stf.c Thu Aug 18 11:34:09 2016 +0000
+++ b/sys/net/if_stf.c Thu Aug 18 11:38:58 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_stf.c,v 1.98 2016/08/07 17:38:34 christos Exp $ */
+/* $NetBSD: if_stf.c,v 1.99 2016/08/18 11:38:58 knakahara Exp $ */
/* $KAME: if_stf.c,v 1.62 2001/06/07 22:32:16 itojun Exp $ */
/*
@@ -75,12 +75,11 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_stf.c,v 1.98 2016/08/07 17:38:34 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_stf.c,v 1.99 2016/08/18 11:38:58 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
#include "stf.h"
-#include "gif.h" /*XXX*/
#endif
#ifndef INET6
@@ -116,7 +115,6 @@
#include <netinet/ip6.h>
#include <netinet6/ip6_var.h>
-#include <netinet6/in6_gif.h>
#include <netinet6/in6_var.h>
#include <netinet/ip_ecn.h>
@@ -126,10 +124,6 @@
#include <net/bpf.h>
-#if NGIF > 0
-#include <net/if_gif.h>
-#endif
-
#include "ioconf.h"
#define IN6_IS_ADDR_6TO4(x) (ntohs((x)->s6_addr16[0]) == 0x2002)
@@ -150,11 +144,7 @@
struct if_clone stf_cloner =
IF_CLONE_INITIALIZER("stf", stf_clone_create, stf_clone_destroy);
-#if NGIF > 0
-extern int ip_gif_ttl; /*XXX*/
-#else
-static int ip_gif_ttl = 40; /*XXX*/
-#endif
+static int ip_stf_ttl = STF_TTL;
extern struct domain inetdomain;
@@ -440,7 +430,7 @@
&ip->ip_src, sizeof(ip->ip_src));
memcpy(&ip->ip_dst, in4, sizeof(ip->ip_dst));
ip->ip_p = IPPROTO_IPV6;
- ip->ip_ttl = ip_gif_ttl; /*XXX*/
+ ip->ip_ttl = ip_stf_ttl;
ip->ip_len = htons(m->m_pkthdr.len);
if (ifp->if_flags & IFF_LINK1)
ip_ecn_ingress(ECN_ALLOWED, &ip->ip_tos, &tos);
diff -r 1a0ecfdd0dc7 -r 0400c8c6bb81 sys/net/if_stf.h
--- a/sys/net/if_stf.h Thu Aug 18 11:34:09 2016 +0000
+++ b/sys/net/if_stf.h Thu Aug 18 11:38:58 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_stf.h,v 1.6 2016/01/28 00:28:11 knakahara Exp $ */
+/* $NetBSD: if_stf.h,v 1.7 2016/08/18 11:38:58 knakahara Exp $ */
/* $KAME: if_stf.h,v 1.3 2000/03/25 07:23:33 sumikawa Exp $ */
/*
@@ -33,6 +33,8 @@
#ifndef _NET_IF_STF_H_
#define _NET_IF_STF_H_
+#define STF_TTL 40
+
#define STF_MTU (1280) /* Default MTU */
#define STF_MTU_MIN (1280) /* Minimum MTU */
#define STF_MTU_MAX (8192) /* Maximum MTU */
Home |
Main Index |
Thread Index |
Old Index