summaryrefslogtreecommitdiff
path: root/proto/ospf/hello.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2011-07-07 17:43:39 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2011-07-08 01:14:52 +0200
commitbeeda6af44e72e3a20fcd2837b231a04354790fa (patch)
treee76d8b473df61139842e88316712bfbef05e2a86 /proto/ospf/hello.c
parent7d4e923603fdb43b6f017e5ef78e37d0891c699c (diff)
Removes timers for stub interfaces. Also fixes some minor bugs.
Diffstat (limited to 'proto/ospf/hello.c')
-rw-r--r--proto/ospf/hello.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/proto/ospf/hello.c b/proto/ospf/hello.c
index 76c95c4f..0a94e4cb 100644
--- a/proto/ospf/hello.c
+++ b/proto/ospf/hello.c
@@ -217,15 +217,14 @@ ospf_hello_receive(struct ospf_packet *ps_i, struct ospf_iface *ifa,
if (ifa->type == OSPF_IT_NBMA)
{
if ((ifa->priority == 0) && (n->priority > 0))
- ospf_hello_send(NULL, OHS_HELLO, n);
+ ospf_hello_send(n->ifa, OHS_HELLO, n);
}
ospf_neigh_sm(n, INM_HELLOREC);
}
void
-ospf_hello_send(timer *timer, int kind, struct ospf_neighbor *dirn)
+ospf_hello_send(struct ospf_iface *ifa, int kind, struct ospf_neighbor *dirn)
{
- struct ospf_iface *ifa;
struct ospf_hello_packet *pkt;
struct ospf_packet *op;
struct proto *p;
@@ -234,11 +233,6 @@ ospf_hello_send(timer *timer, int kind, struct ospf_neighbor *dirn)
int i;
struct nbma_node *nb;
- if (timer == NULL)
- ifa = dirn->ifa;
- else
- ifa = (struct ospf_iface *) timer->data;
-
if (ifa->state <= OSPF_IS_LOOP)
return;
@@ -313,7 +307,7 @@ ospf_hello_send(timer *timer, int kind, struct ospf_neighbor *dirn)
break;
case OSPF_IT_NBMA:
- if (timer == NULL) /* Response to received hello */
+ if (dirn) /* Response to received hello */
{
ospf_send_to(ifa, dirn->ip);
break;