callme ( 7, 2, );
print "done";
- quitbird;
- print "*** FAIL: this is unreachable";
+# quitbird;
+# print "*** FAIL: this is unreachable";
}
filter testf
port 1520;
period 5;
garbagetime 30;
- interface "*";
+ interface "*" { mode broadcast; };
export filter testf;
honour neighbour;
passwords { password "ahoj" from 0 to 10;
- password "nazdar" from 10 to 20;
+ password "nazdar" from 10;
}
+ authentication md5;
}
protocol device {
last_password_item = cfg_alloc(sizeof (struct password_item));
last_password_item->password = $2;
last_password_item->from = 0;
- last_password_item->to = ~0;
+ last_password_item->to = 2000000000;
last_password_item->id = 0;
last_password_item->next = NULL;
$$=last_password_item;
password_list:
/* empty */ { $$ = NULL; }
| password_begin password_items ';' password_list {
- last_password_item->next = $4;
- $$ = last_password_item;
+ $1->next = $4;
+ $$ = $1;
}
;
struct rip_packet *packet = (void *) s->tbuf;
int i;
+ DBG( "Sending to %I\n", s->daddr );
do {
if (c->done) {
if (!neigh_find( p, &whotoldme, 0 )) {
log( L_ERR "%I send me routing info but he is not my neighbour", whotoldme );
+#if 0
return 0;
+#else
+ log( L_ERR "...ignoring" );
+#endif
}
for (i=0; i<num; i++) {
if (!i) {
if (rip_incoming_authentication(p, (void *) block, packet, num))
BAD( "Authentication failed" );
- } else BAD( "Authentication is not the first!" );
+ }
+ /* FIXME: Need to reject packets which have no authentication */
ipa_ntoh( block->network );
ipa_ntoh( block->netmask );
ipa_ntoh( block->nexthop );
if (flags & IF_BROADCAST)
rif->sock->daddr = new->addr->brd;
- if (flags & IF_UNNUMBERED) /* Hmm, rip is not defined over unnumbered links */
+ if (flags & IF_UNNUMBERED) {
rif->sock->daddr = new->addr->opposite;
+ log( L_WARN "RIP/%s: rip is not defined over unnumbered links\n", P_NAME );
+ }
if (want_multicast) {
rif->sock->daddr = ipa_from_u32(0xe0000009);
rif->sock->saddr = ipa_from_u32(0xe0000009);
/* Don't try to transmit into this one? Well, why not? This should not happen, anyway :-) */
}
- log( L_DEBUG "RIP/%s: listening on %s, port %d, mode %s", P_NAME, rif->iface ? rif->iface->name : "(dummy)", P_CF->port, want_multicast ? "multicast" : "broadcast" );
+ log( L_DEBUG "RIP/%s: listening on %s, port %d, mode %s (%I)", P_NAME, rif->iface ? rif->iface->name : "(dummy)", P_CF->port, want_multicast ? "multicast" : "broadcast", rif->sock->daddr );
return rif;
}