summaryrefslogtreecommitdiffstats
path: root/proto/rip/rip.c
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>1998-10-17 12:25:22 +0200
committerPavel Machek <pavel@ucw.cz>1998-10-17 12:25:22 +0200
commitc05ea56f8eb15dfe3c9d18496deaa926e0cf8aac (patch)
treeaee477d6033d31d5783ea54b9597c720acf25a17 /proto/rip/rip.c
parent8333431c4d0d7dcf065938e21440b4ce20cb8f8f (diff)
downloadbird-c05ea56f8eb15dfe3c9d18496deaa926e0cf8aac.tar
bird-c05ea56f8eb15dfe3c9d18496deaa926e0cf8aac.zip
rip should now correctly listen, but entries will not time out.
Diffstat (limited to 'proto/rip/rip.c')
-rw-r--r--proto/rip/rip.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/proto/rip/rip.c b/proto/rip/rip.c
index 6085967..3289717 100644
--- a/proto/rip/rip.c
+++ b/proto/rip/rip.c
@@ -223,7 +223,8 @@ advertise_entry( struct proto *p, struct rip_block *b, ip_addr whotoldme )
rta *a, A;
rte *r;
net *n;
-
+
+ debug( "rip: Advertising entry..." );
bzero(&A, sizeof(A));
A.proto = p;
A.source = RTS_RIP;
@@ -243,6 +244,7 @@ advertise_entry( struct proto *p, struct rip_block *b, ip_addr whotoldme )
r->u.rip.tag = ntohl(b->tag);
r->pflags = 0; /* Here go my flags */
rte_update( n, p, r );
+ debug( "done\n" );
}
static void
@@ -464,12 +466,12 @@ rip_rt_notify(struct proto *p, struct network *net, struct rte *new, struct rte
struct rip_entry *e = new_entry( p );
debug( "inserting new\n" );
- e->whotoldme = IPA_NONE;
e->network = net->n.prefix;
e->pxlen = net->n.pxlen;
- e->nexthop = IPA_NONE; /* FIXME: is it correct? */
+ e->nexthop = new->attrs->gw;
e->tag = new->u.rip.tag;
e->metric = new->u.rip.metric;
+ e->whotoldme = new->attrs->from;
e->updated = e->changed = now;
e->flags = 0;