From 203a010fa05f5d3d23b26d1223c532e480a3646d Mon Sep 17 00:00:00 2001 From: Michele Marchetto Date: Sun, 3 Dec 2006 20:14:38 +0000 Subject: introduce rde_check_route that selects which routes must be accepted and which discarded. Still not complete, just a step forward. ok norby@ henning@ --- usr.sbin/dvmrpd/interface.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'usr.sbin/dvmrpd/interface.c') diff --git a/usr.sbin/dvmrpd/interface.c b/usr.sbin/dvmrpd/interface.c index 453e7683d21..1ee259d535e 100644 --- a/usr.sbin/dvmrpd/interface.c +++ b/usr.sbin/dvmrpd/interface.c @@ -1,4 +1,4 @@ -/* $OpenBSD: interface.c,v 1.3 2006/06/02 17:06:50 norby Exp $ */ +/* $OpenBSD: interface.c,v 1.4 2006/12/03 20:14:37 michele Exp $ */ /* * Copyright (c) 2005 Claudio Jeker @@ -41,6 +41,8 @@ #include "log.h" #include "dvmrpe.h" +extern struct dvmrpd_conf *conf; + void if_probe_timer(int, short, void *); int if_start_probe_timer(struct iface *); int if_stop_probe_timer(struct iface *); @@ -142,6 +144,19 @@ if_fsm(struct iface *iface, enum iface_event event) return (ret); } +struct iface * +if_find_index(u_short ifindex) +{ + struct iface *iface; + + LIST_FOREACH(iface, &conf->iface_list, entry) { + if (iface->ifindex == ifindex) + return (iface); + } + + return (NULL); +} + struct iface * if_new(struct kif *kif) { -- cgit v1.2.3