summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMichele Marchetto <michele@cvs.openbsd.org>2007-01-15 18:23:44 +0000
committerMichele Marchetto <michele@cvs.openbsd.org>2007-01-15 18:23:44 +0000
commitd6cd40bea9bdf5057bdd055510772c505ba587d5 (patch)
tree3cbfb6eda36bf247ad9005dc0f998f2ebc473e86 /usr.sbin
parent86e92f25be910cb6f49e0f3beaebb54d93bb243a (diff)
allow users to specify interface specific parameters even on a global basis
OK henning@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ripd/parse.y8
-rw-r--r--usr.sbin/ripd/rip.h3
2 files changed, 6 insertions, 5 deletions
diff --git a/usr.sbin/ripd/parse.y b/usr.sbin/ripd/parse.y
index 6c6e7618c1b..93b1728519c 100644
--- a/usr.sbin/ripd/parse.y
+++ b/usr.sbin/ripd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.5 2007/01/08 13:01:10 claudio Exp $ */
+/* $OpenBSD: parse.y,v 1.6 2007/01/15 18:23:43 michele Exp $ */
/*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
@@ -236,6 +236,7 @@ conf_main : SPLIT_HORIZON STRING {
SIMPLEQ_INSERT_TAIL(&conf->redist_list, r, entry);
conf->redistribute |= REDISTRIBUTE_ON;
}
+ | defaults
;
authmd : AUTHMD number STRING {
@@ -332,8 +333,7 @@ interface : INTERFACE STRING {
YYERROR;
LIST_INSERT_HEAD(&conf->iface_list, iface, entry);
memcpy(&ifacedefs, defs, sizeof(ifacedefs));
- md_list_copy(&ifacedefs.md_list,
- &defs->md_list);
+ md_list_copy(&ifacedefs.md_list, &defs->md_list);
defs = &ifacedefs;
} interface_block {
iface->cost = defs->cost;
@@ -614,7 +614,7 @@ parse_config(char *filename, int opts)
bzero(&globaldefs, sizeof(globaldefs));
defs = &globaldefs;
TAILQ_INIT(&defs->md_list);
- defs->cost = 1;
+ defs->cost = DEFAULT_COST;
defs->auth_type = AUTH_NONE;
if ((fin = fopen(filename, "r")) == NULL) {
diff --git a/usr.sbin/ripd/rip.h b/usr.sbin/ripd/rip.h
index a1b2a3c3d91..a32125ff255 100644
--- a/usr.sbin/ripd/rip.h
+++ b/usr.sbin/ripd/rip.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rip.h,v 1.1 2006/10/18 16:11:58 norby Exp $ */
+/* $OpenBSD: rip.h,v 1.2 2007/01/15 18:23:43 michele Exp $ */
/*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
@@ -31,6 +31,7 @@
/* metric */
#define INFINITY 16
+#define DEFAULT_COST 1
/* timers */
#define KEEPALIVE 30