summaryrefslogtreecommitdiff
path: root/proto/rip
diff options
context:
space:
mode:
Diffstat (limited to 'proto/rip')
-rw-r--r--proto/rip/rip.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/proto/rip/rip.c b/proto/rip/rip.c
index 01a1aed6..e6411246 100644
--- a/proto/rip/rip.c
+++ b/proto/rip/rip.c
@@ -269,7 +269,8 @@ advertise_entry( struct proto *p, struct rip_block *b, ip_addr whotoldme )
A.gw = ipa_nonzero(b->nexthop) ? b->nexthop : whotoldme;
pxlen = ipa_mklen(b->netmask);
#else
- A.gw = whotoldme; /* FIXME: next hop is in other packet for v6 */
+ /* FIXME: next hop is in other packet for v6 */
+ A.gw = whotoldme;
pxlen = b->pxlen;
#endif
A.from = whotoldme;
@@ -413,6 +414,11 @@ rip_rx(sock *s, int size)
num = size / sizeof( struct rip_block );
if (num>PACKET_MAX) BAD( "Too many blocks" );
+#ifdef IPV6
+ /* Try to absolutize link scope addresses */
+ ipa_absolutize(&s->faddr, &i->iface->addr->ip);
+#endif
+
if (ipa_equal(i->iface->addr->ip, s->faddr)) {
DBG("My own packet\n");
return 1;
@@ -626,8 +632,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
- ip_pton("FF02::9", &rif->sock->daddr); /* FIXME [mj] */
- ip_pton("FF02::9", &rif->sock->saddr);
+ rif->sock->daddr = ipa_build(0xff020000, 0, 0, 9);
+ rif->sock->saddr = new->addr->ip;
#endif
} else {
rif->sock->daddr = new->addr->brd;