summaryrefslogtreecommitdiff
path: root/proto/rip/rip.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2014-10-24 11:11:43 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2014-10-24 11:11:43 +0200
commit88a183c6c9a2b86b52f67e87bbc8b7edd32670c6 (patch)
treeb1348b71e69f9ed0d919a4792549026c9e31b092 /proto/rip/rip.c
parentf8fefde318c6248ad94e7b6d60155deed9ab8eed (diff)
Integrated IP functions.
Diffstat (limited to 'proto/rip/rip.c')
-rw-r--r--proto/rip/rip.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/proto/rip/rip.c b/proto/rip/rip.c
index bc9ffc5f..a0c28e72 100644
--- a/proto/rip/rip.c
+++ b/proto/rip/rip.c
@@ -305,7 +305,7 @@ advertise_entry( struct proto *p, struct rip_block *b, ip_addr whotoldme, struct
A.flags = 0;
#ifndef IPV6
A.gw = ipa_nonzero(b->nexthop) ? b->nexthop : whotoldme;
- pxlen = ipa_mklen(b->netmask);
+ pxlen = ipa_masklen(b->netmask);
#else
/* FIXME: next hop is in other packet for v6 */
A.gw = whotoldme;
@@ -365,7 +365,7 @@ process_block( struct proto *p, struct rip_block *block, ip_addr whotoldme, stru
#ifndef IPV6
metric = ntohl( block->metric );
- pxlen = ipa_mklen(block->netmask);
+ pxlen = ipa_masklen(block->netmask);
#else
metric = block->metric;
pxlen = block->pxlen;
@@ -447,7 +447,7 @@ rip_process_packet( struct proto *p, struct rip_packet *packet, int num, ip_addr
ipa_ntoh( block->netmask );
ipa_ntoh( block->nexthop );
if (packet->heading.version == RIP_V1) /* FIXME (nonurgent): switch to disable this? */
- block->netmask = ipa_class_mask(block->network);
+ block->netmask = ip4_class_mask(ipa_to_ip4(block->network));
#endif
process_block( p, block, whotoldme, iface );
}
@@ -721,7 +721,7 @@ new_iface(struct proto *p, struct iface *new, unsigned long flags, struct iface_
#ifndef IPV6
rif->sock->daddr = ipa_from_u32(0xe0000009);
#else
- rif->sock->daddr = ipa_build(0xff020000, 0, 0, 9);
+ rif->sock->daddr = IP6_RIP_ROUTERS;
#endif
} else {
rif->sock->daddr = new->addr->brd;
@@ -812,7 +812,7 @@ rip_if_notify(struct proto *p, unsigned c, struct iface *iface)
#ifndef IPV6
lock->addr = ipa_from_u32(0xe0000009);
#else
- ip_pton("FF02::9", &lock->addr);
+ lock->addr = IP6_RIP_ROUTERS;
#endif
else
lock->addr = iface->addr->brd;