diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2006-06-10 16:32:39 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2006-06-10 16:32:39 +0000 |
commit | 76a53b6496cc9ff271f6b456ab3234b13e8a8dc6 (patch) | |
tree | 5c62fbe5bf77af44fe5b6f39ffc4a90a347d0d5d /usr.sbin/bgpd | |
parent | 7e64cfddc22b3342a1e26c5d8e54134962614423 (diff) |
back in the dark age, carp interfaces were very strange - and we had to
detect them looking at their name, beginning with carp.
these days, we can just check for the iftype to be IFT_CARP.
wanted to do this for some time and kept forgetting. from the airplane over two
weeks ago, forgotten in a secondary tree again...
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r-- | usr.sbin/bgpd/session.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index a2317feffde..d66cc498389 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.249 2006/05/27 21:24:36 claudio Exp $ */ +/* $OpenBSD: session.c,v 1.250 2006/06/10 16:32:38 henning Exp $ */ /* * Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org> @@ -22,6 +22,7 @@ #include <sys/mman.h> #include <sys/socket.h> #include <sys/un.h> +#include <net/if_types.h> #include <netinet/in.h> #include <netinet/in_systm.h> #include <netinet/ip.h> @@ -2317,7 +2318,7 @@ session_dispatch_imsg(struct imsgbuf *ibuf, int idx, u_int *listener_cnt) depend_ok = (kif->flags & IFF_UP) && (kif->link_state == LINK_STATE_UP || (kif->link_state == LINK_STATE_UNKNOWN && - strncmp(kif->ifname, "carp", 4))); + kif->media_type != IFT_CARP)); for (p = peers; p != NULL; p = p->next) if (!strcmp(p->conf.if_depend, kif->ifname)) { |