summaryrefslogtreecommitdiff
path: root/usr.sbin/dvmrpd/neighbor.c
diff options
context:
space:
mode:
authorEsben Norby <norby@cvs.openbsd.org>2006-06-01 18:18:26 +0000
committerEsben Norby <norby@cvs.openbsd.org>2006-06-01 18:18:26 +0000
commit037b84a240f6ab84d7fe79649d7e98565599fa54 (patch)
tree2c4dd71a04f4e00a5ccae8c7faabe32a4e4eb825 /usr.sbin/dvmrpd/neighbor.c
parent43fa570b5bc2c2c902ac0b4d5d93c6544759b189 (diff)
implement adjacent nbr count, needed when we want to decide where to flood
multicast streams.
Diffstat (limited to 'usr.sbin/dvmrpd/neighbor.c')
-rw-r--r--usr.sbin/dvmrpd/neighbor.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/dvmrpd/neighbor.c b/usr.sbin/dvmrpd/neighbor.c
index c8282c5eaa2..074544f61e7 100644
--- a/usr.sbin/dvmrpd/neighbor.c
+++ b/usr.sbin/dvmrpd/neighbor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: neighbor.c,v 1.1 2006/06/01 14:12:20 norby Exp $ */
+/* $OpenBSD: neighbor.c,v 1.2 2006/06/01 18:18:25 norby Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -149,6 +149,11 @@ nbr_fsm(struct nbr *nbr, enum nbr_event event)
gettimeofday(&now, NULL);
nbr->uptime = now.tv_sec;
+
+ if (nbr->state & NBR_STA_2_WAY)
+ nbr->iface->adj_cnt++;
+ else
+ nbr->iface->adj_cnt--;
}
log_debug("nbr_fsm: event '%s' resulted in action '%s' and "