summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2000-04-29 17:45:30 +0200
committerPavel Machek <pavel@ucw.cz>2000-04-29 17:45:30 +0200
commit9c1a55deeeb5aa5cd2f18b109fabb50947c308ab (patch)
treeddf7f275b2a28ff1abedf1513c8b8c69e2446dfd
parent46cdc7e20faaf922431a157bcb0f82a45b7aa2d2 (diff)
downloadbird-9c1a55deeeb5aa5cd2f18b109fabb50947c308ab.tar
bird-9c1a55deeeb5aa5cd2f18b109fabb50947c308ab.zip
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::;
-rw-r--r--proto/rip/rip.c13
1 files changed, 10 insertions, 3 deletions
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; i<num; i++) {
struct rip_block *block = &packet->block[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;