From 9c1a55deeeb5aa5cd2f18b109fabb50947c308ab Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Sat, 29 Apr 2000 15:45:30 +0000 Subject: IpV6 now actually compiles. Mj, could you provide example of static config for ipv6 that is _not_ rejected by checks? I tried this and got rejected. route 62:168::/32 via 62:169::; route 1:2::/32 via 1:3::; --- proto/rip/rip.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'proto/rip/rip.c') diff --git a/proto/rip/rip.c b/proto/rip/rip.c index 9d5b772..54627d5 100644 --- a/proto/rip/rip.c +++ b/proto/rip/rip.c @@ -58,10 +58,10 @@ static int rip_tx_prepare(struct proto *p, ip_addr daddr, struct rip_block *b, struct rip_entry *e, struct rip_interface *rif, int pos ) { DBG( "." ); - b->family = htons( 2 ); /* AF_INET */ b->tag = htons( e->tag ); b->network = e->n.prefix; #ifndef IPV6 + b->family = htons( 2 ); /* AF_INET */ b->netmask = ipa_mkmask( e->n.pxlen ); ipa_hton( b->netmask ); @@ -339,6 +339,8 @@ rip_process_packet( struct proto *p, struct rip_packet *packet, int num, ip_addr for (i=0; iblock[i]; +#ifndef IPV6 + /* Authentication is not defined for v6 */ if (block->family == 0xffff) { if (i) continue; /* md5 tail has this family */ @@ -347,6 +349,7 @@ rip_process_packet( struct proto *p, struct rip_packet *packet, int num, ip_addr authenticated = 1; continue; } +#endif if ((!authenticated) && (P_CF->authtype != AT_NONE)) BAD( "Packet is not authenticated and it should be" ); ipa_ntoh( block->network ); @@ -597,8 +600,8 @@ new_iface(struct proto *p, struct iface *new, unsigned long flags, struct iface_ 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); + ip_pton("FF02::9", &rif->sock->daddr); + ip_pton("FF02::9", &rif->sock->saddr); #endif } else rif->sock->daddr = new->addr->brd; @@ -657,12 +660,16 @@ rip_if_notify(struct proto *p, unsigned c, struct iface *iface) if (!k) return; /* We are not interested in this interface */ lock = olock_new( p->pool ); +#ifndef IPV6 lock->addr = ipa_from_u32(0xe0000009); /* This is okay: we may actually use other address, but we do not want two rips at one time, anyway. */ +#else + ip_pton("FF02::9", &lock->addr); +#endif lock->port = P_CF->port; lock->iface = iface; lock->hook = rip_real_if_add; -- cgit v1.2.3