summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2010-06-26 19:49:55 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2010-06-26 19:49:55 +0000
commit65037ace5cd66de6d2def3c899589e4b1a811e76 (patch)
treea766723381f4e38e468db5f62fee760a292234d0 /sys/netinet
parentd2627aea56cfdda0e369bfc25115206f9e3077c2 (diff)
Implement a simple keepalive mechanism in gre(4) that is compatible with
the one used by Cisco. It sends a return gre packet inside a gre packet to the other side and expects it to return. OK deraadt, reyk additional testing by sthen
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_gre.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/netinet/ip_gre.c b/sys/netinet/ip_gre.c
index a0652b1ed3c..b53af449470 100644
--- a/sys/netinet/ip_gre.c
+++ b/sys/netinet/ip_gre.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_gre.c,v 1.37 2010/05/11 09:22:56 claudio Exp $ */
+/* $OpenBSD: ip_gre.c,v 1.38 2010/06/26 19:49:54 claudio Exp $ */
/* $NetBSD: ip_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */
/*
@@ -187,6 +187,11 @@ gre_input2(m , hlen, proto)
af = AF_INET6;
break;
#endif
+ case 0:
+ /* keepalive reply, retrigger hold timer */
+ gre_recv_keepalive(sc);
+ m_freem(m);
+ return (1);
#ifdef MPLS
case ETHERTYPE_MPLS:
case ETHERTYPE_MPLS_MCAST: