Revision c010f4cb proto/rip/rip.c

View differences:

proto/rip/rip.c
6 6
 *	Can be freely distributed and used under the terms of the GNU GPL.
7 7
 *
8 8
 	FIXME: IpV6 support: packet size
9
 	FIXME: IpV6 support: use right address for broadcasts
10
	FIXME: IpV6 support: receive "route using" blocks
9
	FIXME: (nonurgent) IpV6 support: receive "route using" blocks
10
	FIXME: (nonurgent) IpV6 support: generate "nexthop" blocks
11
		next hops are only advisory, and they are pretty ugly in IpV6.
12
		I suggest just forgetting about them.
11 13

  
12 14
	FIXME (nonurgent): fold rip_connection into rip_interface?
13 15

  
......
127 129
    packet->heading.unused  = 0;
128 130

  
129 131
    i = !!P_CF->authtype;
132
#ifndef IPV6
130 133
    maxi = ((P_CF->authtype == AT_MD5) ? PACKET_MD5_MAX : PACKET_MAX);
134
#else
135
    maxi = 5; /* We need to have at least reserve of one at end of packet */
136
#endif
131 137
    
132 138
    FIB_ITERATE_START(&P->rtable, &c->iter, z) {
133 139
      struct rip_entry *e = (struct rip_entry *) z;
......
298 304
  CHK_MAGIC;
299 305
  TRACE(D_ROUTES, "block: %I tells me: %I/??? available, metric %d... ", whotoldme, network, metric );
300 306
  if ((!metric) || (metric > P_CF->infinity)) {
307
#ifdef IPV6 /* Someone is sedning us nexthop and we are ignoring it */
308
    if (metric == 0xff)
309
      { debug( "IpV6 nexthop ignored" ); return; }
310
#endif
301 311
    log( L_WARN "Got metric %d from %I", metric, whotoldme );
302 312
    return;
303 313
  }
......
581 591
    if (new->addr->flags & IA_UNNUMBERED)
582 592
      log( L_WARN "%s: rip is not defined over unnumbered links", P_NAME );
583 593
    if (rif->multicast) {
594
#ifndef IPV6
584 595
      rif->sock->daddr = ipa_from_u32(0xe0000009);
585 596
      rif->sock->saddr = ipa_from_u32(0xe0000009);
597
#else
598
      p_pton("FF02::9", &rif->sock->daddr);
599
      p_pton("FF02::9", &rif->sock->saddr);
600
#endif
586 601
    } else
587 602
      rif->sock->daddr = new->addr->brd;
588 603
  }

Also available in: Unified diff