Revision 92cc1e74 proto/rip/packets.c

View differences:

proto/rip/packets.c
434 434
  byte *max = rip_tx_buffer(ifa) + ifa->tx_plen -
435 435
    (rip_is_v2(p) ? RIP_BLOCK_LENGTH : 2*RIP_BLOCK_LENGTH);
436 436
  ip_addr last_next_hop = IPA_NONE;
437
  btime now_ = current_time();
437 438
  int send = 0;
438 439

  
439 440
  struct rip_packet *pkt = (void *) pos;
......
450 451

  
451 452
    /* Stale entries that should be removed */
452 453
    if ((en->valid == RIP_ENTRY_STALE) &&
453
	((en->changed + (bird_clock_t) ifa->cf->garbage_time) <= now))
454
	((en->changed + ifa->cf->garbage_time) <= now_))
454 455
      goto next_entry;
455 456

  
456 457
    /* Triggered updates */
......
540 541
 * activating the new one.
541 542
 */
542 543
void
543
rip_send_table(struct rip_proto *p, struct rip_iface *ifa, ip_addr addr, bird_clock_t changed)
544
rip_send_table(struct rip_proto *p, struct rip_iface *ifa, ip_addr addr, btime changed)
544 545
{
545 546
  DBG("RIP: Opening TX session to %I on %s\n", addr, ifa->iface->name);
546 547

  
......
591 592

  
592 593
  byte *pos = (byte *) pkt + sizeof(struct rip_packet);
593 594
  byte *end = (byte *) pkt + plen;
595
  btime now_ = current_time();
594 596

  
595 597
  for (; pos < end; pos += RIP_BLOCK_LENGTH)
596 598
  {
......
638 640
	.next_hop = ipa_nonzero(rte.next_hop) ? rte.next_hop : from->nbr->addr,
639 641
	.metric = rte.metric,
640 642
	.tag = rte.tag,
641
	.expires = now + ifa->cf->timeout_time
643
	.expires = now_ + ifa->cf->timeout_time
642 644
      };
643 645

  
644 646
      rip_update_rte(p, &rte.net, &new);
......
705 707
  if ((plen - sizeof(struct rip_packet)) % RIP_BLOCK_LENGTH)
706 708
    DROP("invalid length", plen);
707 709

  
708
  n->last_seen = now;
710
  n->last_seen = current_time();
709 711
  rip_update_bfd(p, n);
710 712

  
711 713
  switch (pkt->command)

Also available in: Unified diff