summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphessler <phessler@openbsd.org>2016-09-03 14:23:14 +0000
committerphessler <phessler@openbsd.org>2016-09-03 14:23:14 +0000
commit0fa555c9f3a0048b95e651f3e2c23aa5867e649b (patch)
tree714211332bb6eb11c22a90a49b0b5b78ec55d97f
parentAdd in the (disabled) kernel glue for BFD (diff)
downloadwireguard-openbsd-0fa555c9f3a0048b95e651f3e2c23aa5867e649b.tar.xz
wireguard-openbsd-0fa555c9f3a0048b95e651f3e2c23aa5867e649b.zip
Add userland parts for BFD. Can't work if you don't have it enabled in
the kernel. OK claudio@, henning@
-rw-r--r--sbin/route/keywords.h4
-rw-r--r--sbin/route/keywords.sh3
-rw-r--r--sbin/route/route.c9
-rw-r--r--sbin/route/show.c3
-rw-r--r--usr.bin/netstat/show.c3
5 files changed, 17 insertions, 5 deletions
diff --git a/sbin/route/keywords.h b/sbin/route/keywords.h
index 6df4423758c..8345534d493 100644
--- a/sbin/route/keywords.h
+++ b/sbin/route/keywords.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: keywords.h,v 1.31 2015/09/11 20:08:40 mpi Exp $ */
+/* $OpenBSD: keywords.h,v 1.32 2016/09/03 14:23:14 phessler Exp $ */
/* WARNING! This file was generated by keywords.sh */
@@ -10,6 +10,7 @@ struct keytab {
enum {
K_NULL,
K_ADD,
+ K_BFD,
K_BGP,
K_BLACKHOLE,
K_CHANGE,
@@ -70,6 +71,7 @@ enum {
struct keytab keywords[] = {
{ "add", K_ADD },
+ { "bfd", K_BFD },
{ "bgp", K_BGP },
{ "blackhole", K_BLACKHOLE },
{ "change", K_CHANGE },
diff --git a/sbin/route/keywords.sh b/sbin/route/keywords.sh
index 67860c40852..2e372ff9816 100644
--- a/sbin/route/keywords.sh
+++ b/sbin/route/keywords.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: keywords.sh,v 1.29 2015/10/24 11:53:41 bluhm Exp $
+# $OpenBSD: keywords.sh,v 1.30 2016/09/03 14:23:14 phessler Exp $
# $NetBSD: keywords.sh,v 1.2 1996/11/15 18:57:21 gwr Exp $
# @(#)keywords 8.2 (Berkeley) 3/19/94
#
@@ -11,6 +11,7 @@ awk=${AWK:-awk}
# the following must be sorted
cat << _EOF_ | sort > _keywords.t1
add
+bfd
blackhole
bgp
change
diff --git a/sbin/route/route.c b/sbin/route/route.c
index 6cb31ab9d7b..dc0bd45a456 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.188 2016/09/01 10:41:09 bluhm Exp $ */
+/* $OpenBSD: route.c,v 1.189 2016/09/03 14:23:14 phessler Exp $ */
/* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */
/*
@@ -607,6 +607,9 @@ newroute(int argc, char **argv)
usage(1+*argv);
prio = getpriority(*++argv);
break;
+ case K_BFD:
+ flags |= RTF_BFD;
+ break;
default:
usage(1+*argv);
/* NOTREACHED */
@@ -1232,6 +1235,7 @@ char *msgtypes[] = {
"RTM_IFINFO: iface status change",
"RTM_IFANNOUNCE: iface arrival/departure",
"RTM_DESYNC: route socket overflow",
+ "RTM_BFD: bidirectional forwarding detection",
};
char metricnames[] =
@@ -1323,6 +1327,9 @@ print_rtmsg(struct rt_msghdr *rtm, int msglen)
}
printf("\n");
break;
+ case RTM_BFD:
+ printf("bfd\n"); /* XXX - expand*/
+ break;
default:
printf(", priority %d, table %u, ifidx %u, ",
rtm->rtm_priority, rtm->rtm_tableid, rtm->rtm_index);
diff --git a/sbin/route/show.c b/sbin/route/show.c
index a04924f1f9a..412c595ac49 100644
--- a/sbin/route/show.c
+++ b/sbin/route/show.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: show.c,v 1.105 2016/09/01 09:41:34 bluhm Exp $ */
+/* $OpenBSD: show.c,v 1.106 2016/09/03 14:23:14 phessler Exp $ */
/* $NetBSD: show.c,v 1.1 1996/11/15 18:01:41 gwr Exp $ */
/*
@@ -90,6 +90,7 @@ static const struct bits bits[] = {
{ RTF_MPATH, 'P' },
{ RTF_MPLS, 'T' },
{ RTF_LOCAL, 'l' },
+ { RTF_BFD, 'F' },
{ RTF_BROADCAST,'b' },
{ RTF_CONNECTED,'n' },
{ 0 }
diff --git a/usr.bin/netstat/show.c b/usr.bin/netstat/show.c
index 6bc2496b5f0..dd42d5095a0 100644
--- a/usr.bin/netstat/show.c
+++ b/usr.bin/netstat/show.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: show.c,v 1.51 2016/09/01 09:41:34 bluhm Exp $ */
+/* $OpenBSD: show.c,v 1.52 2016/09/03 14:23:14 phessler Exp $ */
/* $NetBSD: show.c,v 1.1 1996/11/15 18:01:41 gwr Exp $ */
/*
@@ -90,6 +90,7 @@ static const struct bits bits[] = {
{ RTF_MPATH, 'P' },
{ RTF_MPLS, 'T' },
{ RTF_LOCAL, 'l' },
+ { RTF_BFD, 'F' },
{ RTF_BROADCAST,'b' },
{ RTF_CONNECTED,'n' },
{ 0 }