aboutsummaryrefslogtreecommitdiff
path: root/sbin/route
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2014-11-19 01:07:58 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2014-11-19 01:07:58 +0000
commit9268022b74279434ed6300244e3f977e56a8ceb5 (patch)
tree377ac0ac449528621eb192cd245adadb5fd53668 /sbin/route
parent29c34e9d2781cf25403647fb5af7d7ddb23be7e1 (diff)
parent8c3d6a4ab2a4a95d864d9a32d0157d7de90498a4 (diff)
downloadsrc-9268022b74279434ed6300244e3f977e56a8ceb5.tar.gz
src-9268022b74279434ed6300244e3f977e56a8ceb5.zip
Merge from head@274682
Notes
Notes: svn path=/projects/bmake/; revision=274683
Diffstat (limited to 'sbin/route')
-rw-r--r--sbin/route/keywords1
-rw-r--r--sbin/route/route.83
-rw-r--r--sbin/route/route.c19
3 files changed, 14 insertions, 9 deletions
diff --git a/sbin/route/keywords b/sbin/route/keywords
index 8b64be28d384..82edc46690d1 100644
--- a/sbin/route/keywords
+++ b/sbin/route/keywords
@@ -40,7 +40,6 @@ osi
prefixlen
proto1
proto2
-proto3
proxy
recvpipe
reject
diff --git a/sbin/route/route.8 b/sbin/route/route.8
index 000fbe9c1874..5e6f78b4e017 100644
--- a/sbin/route/route.8
+++ b/sbin/route/route.8
@@ -28,7 +28,7 @@
.\" @(#)route.8 8.3 (Berkeley) 3/19/94
.\" $FreeBSD$
.\"
-.Dd January 11, 2014
+.Dd November 11, 2014
.Dt ROUTE 8
.Os
.Sh NAME
@@ -315,7 +315,6 @@ by indicating the following corresponding modifiers:
-blackhole RTF_BLACKHOLE - silently discard pkts (during updates)
-proto1 RTF_PROTO1 - set protocol specific routing flag #1
-proto2 RTF_PROTO2 - set protocol specific routing flag #2
--proto3 RTF_PROTO3 - set protocol specific routing flag #3
.Ed
.Pp
The optional modifiers
diff --git a/sbin/route/route.c b/sbin/route/route.c
index 9b3bb9533f61..53ec2986341a 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -847,9 +847,6 @@ newroute(int argc, char **argv)
case K_PROTO2:
flags |= RTF_PROTO2;
break;
- case K_PROTO3:
- flags |= RTF_PROTO3;
- break;
case K_PROXY:
nrflags |= F_PROXY;
break;
@@ -1533,9 +1530,19 @@ rtmsg(int cmd, int flags, int fib)
if (debugonly)
return (0);
if ((rlen = write(s, (char *)&m_rtmsg, l)) < 0) {
- if (errno == EPERM)
+ switch (errno) {
+ case EPERM:
err(1, "writing to routing socket");
- warn("writing to routing socket");
+ break;
+ case ESRCH:
+ warnx("route has not been found");
+ break;
+ case EEXIST:
+ /* Handled by newroute() */
+ break;
+ default:
+ warn("writing to routing socket");
+ }
return (-1);
}
if (cmd == RTM_GET) {
@@ -1580,7 +1587,7 @@ static const char routeflags[] =
"\1UP\2GATEWAY\3HOST\4REJECT\5DYNAMIC\6MODIFIED\7DONE"
"\012XRESOLVE\013LLINFO\014STATIC\015BLACKHOLE"
"\017PROTO2\020PROTO1\021PRCLONING\022WASCLONED\023PROTO3"
- "\025PINNED\026LOCAL\027BROADCAST\030MULTICAST\035STICKY";
+ "\024FIXEDMTU\025PINNED\026LOCAL\027BROADCAST\030MULTICAST\035STICKY";
static const char ifnetflags[] =
"\1UP\2BROADCAST\3DEBUG\4LOOPBACK\5PTP\6b6\7RUNNING\010NOARP"
"\011PPROMISC\012ALLMULTI\013OACTIVE\014SIMPLEX\015LINK0\016LINK1"