aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/command.c
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>1998-07-28 21:54:54 +0000
committerBrian Somers <brian@FreeBSD.org>1998-07-28 21:54:54 +0000
commit2062443fd707504993740df31d81b7bd4eeffa54 (patch)
treeb237928b95021b6c0ff9faa20eecef45184cf6a6 /usr.sbin/ppp/command.c
parent93280d730e1fd96ed607ce4360ff10a1c160833c (diff)
downloadsrc-2062443fd707504993740df31d81b7bd4eeffa54.tar.gz
src-2062443fd707504993740df31d81b7bd4eeffa54.zip
Silence ``Network unreachable'' warnings when using
``add .... HISADDR''. The network will never be reachable at this point unless we're in -auto or reading the command from ppp.linkup. We can now run the following lines and get the expected results: set ifaddr 1.2.3.4/0 5.6.7.8/0 add default HISADDR where a route is added immediately in auto mode and the whole thing is delayed 'till the IP numbers have been agreed in other modes. Essentially, ppp.linkup is no longer required.
Notes
Notes: svn path=/head/; revision=37927
Diffstat (limited to 'usr.sbin/ppp/command.c')
-rw-r--r--usr.sbin/ppp/command.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c
index ffae13f1e431..69e5365320ea 100644
--- a/usr.sbin/ppp/command.c
+++ b/usr.sbin/ppp/command.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: command.c,v 1.154 1998/07/04 22:03:56 brian Exp $
+ * $Id: command.c,v 1.155 1998/07/12 00:30:18 brian Exp $
*
*/
#include <sys/types.h>
@@ -122,7 +122,7 @@
#define NEG_DNS 50
const char Version[] = "2.0";
-const char VersionDate[] = "$Date: 1998/07/04 22:03:56 $";
+const char VersionDate[] = "$Date: 1998/07/12 00:30:18 $";
static int ShowCommand(struct cmdargs const *);
static int TerminalCommand(struct cmdargs const *);
@@ -1617,7 +1617,7 @@ AddCommand(struct cmdargs const *arg)
gateway = GetIpAddr(arg->argv[arg->argn+gw]);
if (bundle_SetRoute(arg->bundle, RTM_ADD, dest, gateway, netmask,
- arg->cmd->args ? 1 : 0))
+ arg->cmd->args ? 1 : 0, (addrs & ROUTE_GWHISADDR) ? 1 : 0))
route_Add(&arg->bundle->ncp.ipcp.route, addrs, dest, netmask, gateway);
return 0;
@@ -1650,7 +1650,7 @@ DeleteCommand(struct cmdargs const *arg)
}
none.s_addr = INADDR_ANY;
bundle_SetRoute(arg->bundle, RTM_DELETE, dest, none, none,
- arg->cmd->args ? 1 : 0);
+ arg->cmd->args ? 1 : 0, 0);
route_Delete(&arg->bundle->ncp.ipcp.route, addrs, dest);
}
} else