diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2005-03-30 07:59:04 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2005-03-30 07:59:04 +0000 |
commit | 1621084c749033911cc4485ae5e81d335d1f86ab (patch) | |
tree | a5b3d149ab92e1c1fe5a19e262d5ef1e331c805e /sbin/route/route.c | |
parent | bf0f94ab5eae936591e29e8f7d2a371fea208c3d (diff) |
make set_metric() bail out on invalid keys (unreachable, but better
safe than sorry later)
Diffstat (limited to 'sbin/route/route.c')
-rw-r--r-- | sbin/route/route.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c index a4c2e208f3a..8eb3c9b9116 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.86 2005/03/30 05:34:30 henning Exp $ */ +/* $OpenBSD: route.c,v 1.87 2005/03/30 07:59:03 henning Exp $ */ /* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */ /* @@ -333,6 +333,8 @@ set_metric(char *value, int key) valp = &rt_metrics.rmx_rttvar; flag = RTV_RTTVAR; break; + default: + errx(1, "king bula sez: set_metric with invalid key"); } rtm_inits |= flag; if (lockrest || locking) |