diff options
author | Pavel Machek <pavel@ucw.cz> | 2000-04-26 11:33:03 +0000 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 2000-04-26 11:33:03 +0000 |
commit | c010f4cb3771536fc62e534549e22c725285bbd2 (patch) | |
tree | 766ac7da6a4f3b73cd8ededc158993a5d8f48640 /proto | |
parent | 7f704c06d86c58985e964e05df57d14b92e0cd05 (diff) |
Use right address for ripv6.
Diffstat (limited to 'proto')
-rw-r--r-- | proto/rip/rip.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/proto/rip/rip.c b/proto/rip/rip.c index 4c88cc88..b66de282 100644 --- a/proto/rip/rip.c +++ b/proto/rip/rip.c @@ -6,8 +6,10 @@ * Can be freely distributed and used under the terms of the GNU GPL. * FIXME: IpV6 support: packet size - FIXME: IpV6 support: use right address for broadcasts - FIXME: IpV6 support: receive "route using" blocks + FIXME: (nonurgent) IpV6 support: receive "route using" blocks + FIXME: (nonurgent) IpV6 support: generate "nexthop" blocks + next hops are only advisory, and they are pretty ugly in IpV6. + I suggest just forgetting about them. FIXME (nonurgent): fold rip_connection into rip_interface? @@ -127,7 +129,11 @@ rip_tx( sock *s ) packet->heading.unused = 0; i = !!P_CF->authtype; +#ifndef IPV6 maxi = ((P_CF->authtype == AT_MD5) ? PACKET_MD5_MAX : PACKET_MAX); +#else + maxi = 5; /* We need to have at least reserve of one at end of packet */ +#endif FIB_ITERATE_START(&P->rtable, &c->iter, z) { struct rip_entry *e = (struct rip_entry *) z; @@ -298,6 +304,10 @@ process_block( struct proto *p, struct rip_block *block, ip_addr whotoldme ) CHK_MAGIC; TRACE(D_ROUTES, "block: %I tells me: %I/??? available, metric %d... ", whotoldme, network, metric ); if ((!metric) || (metric > P_CF->infinity)) { +#ifdef IPV6 /* Someone is sedning us nexthop and we are ignoring it */ + if (metric == 0xff) + { debug( "IpV6 nexthop ignored" ); return; } +#endif log( L_WARN "Got metric %d from %I", metric, whotoldme ); return; } @@ -581,8 +591,13 @@ new_iface(struct proto *p, struct iface *new, unsigned long flags, struct iface_ if (new->addr->flags & IA_UNNUMBERED) log( L_WARN "%s: rip is not defined over unnumbered links", P_NAME ); if (rif->multicast) { +#ifndef IPV6 rif->sock->daddr = ipa_from_u32(0xe0000009); rif->sock->saddr = ipa_from_u32(0xe0000009); +#else + p_pton("FF02::9", &rif->sock->daddr); + p_pton("FF02::9", &rif->sock->saddr); +#endif } else rif->sock->daddr = new->addr->brd; } |