summaryrefslogtreecommitdiffstats
path: root/sbin/route
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1996-08-13 22:20:20 +0000
committerjulian <julian@FreeBSD.org>1996-08-13 22:20:20 +0000
commit521551a94c26abb72ce3538eb54e226c481f5dad (patch)
tree50a384e183af34a9380167adb03408d4758445c3 /sbin/route
parentc36121cb272198272b3672cdf22b301e682e23c0 (diff)
downloadFreeBSD-src-521551a94c26abb72ce3538eb54e226c481f5dad.zip
FreeBSD-src-521551a94c26abb72ce3538eb54e226c481f5dad.tar.gz
Submitted by: Archie@whistle.com
if making a interface route, and it's a P2P link, then also automatically lable it as an llinfo entry so that gated and friends don't clobber it..
Diffstat (limited to 'sbin/route')
-rw-r--r--sbin/route/keywords1
-rw-r--r--sbin/route/route.87
-rw-r--r--sbin/route/route.c8
3 files changed, 13 insertions, 3 deletions
diff --git a/sbin/route/keywords b/sbin/route/keywords
index b031a9e..07a0ddc 100644
--- a/sbin/route/keywords
+++ b/sbin/route/keywords
@@ -21,6 +21,7 @@ ifp
inet
iso
link
+llinfo
lock
lockrest
mask
diff --git a/sbin/route/route.8 b/sbin/route/route.8
index be13a70..3a9ccc0 100644
--- a/sbin/route/route.8
+++ b/sbin/route/route.8
@@ -177,8 +177,11 @@ no intermediary system to act as a gateway, the
modifier should be specified;
the gateway given is the address of this host on the common network,
indicating the interface to be used for transmission.
-If the interface point to point, the name of the interface
-itself may be given instead.
+Alternately, if the interface is point to point the name of the interface
+itself may be given, in which case the route remains valid even
+if the local or remote addresses change. This forces the
+.Fl llinfo
+flag.
.Pp
The optional modifiers
.Fl xns ,
diff --git a/sbin/route/route.c b/sbin/route/route.c
index a823569..6acb279 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -43,7 +43,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)route.c 8.3 (Berkeley) 3/19/94";
*/
static const char rcsid[] =
- "$Id: route.c,v 1.11 1996/07/23 22:00:14 julian Exp $";
+ "$Id: route.c,v 1.12 1996/08/09 22:52:02 julian Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -111,6 +111,7 @@ int s;
int forcehost, forcenet, doflush, nflag, af, qflag, tflag, keyword();
int iflag, verbose, aflen = sizeof (struct sockaddr_in);
int locking, lockrest, debugonly;
+int extra_flags;
struct rt_metrics rt_metrics;
u_long rtm_inits;
struct in_addr inet_makeaddr();
@@ -596,6 +597,9 @@ newroute(argc, argv)
case K_NOSTATIC:
flags &= ~RTF_STATIC;
break;
+ case K_LLINFO:
+ flags |= RTF_LLINFO;
+ break;
case K_LOCK:
locking = 1;
break;
@@ -704,6 +708,7 @@ newroute(argc, argv)
if (forcenet)
ishost = 0;
flags |= RTF_UP;
+ flags |= extra_flags;
if (ishost)
flags |= RTF_HOST;
if (iflag == 0)
@@ -866,6 +871,7 @@ getaddr(which, s, hpp)
/* If we found it, then use it */
if (sdl) {
su->sdl = *sdl;
+ extra_flags |= RTF_LLINFO;
return(1);
}
}
OpenPOWER on IntegriCloud