diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2005-03-29 11:20:02 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2005-03-29 11:20:02 +0000 |
commit | 2dea92f71f5391d6ae03eb66482b27c492882a2f (patch) | |
tree | 5240c2d58a460f3e745676fd588b882d45f4628f /usr.sbin | |
parent | a48f22beb00c28eed9da554cbc9ce41d95405cf0 (diff) |
explicitely check interface flags for IFF_UP in kroute_validate
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/kroute.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/kroute.c b/usr.sbin/bgpd/kroute.c index 8b6daef62cb..b0d1400c733 100644 --- a/usr.sbin/bgpd/kroute.c +++ b/usr.sbin/bgpd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.119 2005/03/28 14:40:04 henning Exp $ */ +/* $OpenBSD: kroute.c,v 1.120 2005/03/29 11:20:01 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -762,8 +762,12 @@ kroute_validate(struct kroute *kr) kr->ifindex, inet_ntoa(kr->prefix), kr->prefixlen); return (1); - } else - return (kif->k.link_state != LINK_STATE_DOWN); + } + + if (!(kif->k.flags & IFF_UP)) + return (0); + + return (kif->k.link_state != LINK_STATE_DOWN); } void |