0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 17:51:53 +00:00

Be more verbose.

This commit is contained in:
Ondrej Filip 2000-05-10 23:42:13 +00:00
parent 74ac7cdb1a
commit 31dca43534

View File

@ -58,6 +58,8 @@ ospf_hello_rx(struct ospf_hello_packet *ps, struct proto *p,
nrid=ntohl(((struct ospf_packet *)ps)->routerid); nrid=ntohl(((struct ospf_packet *)ps)->routerid);
debug("%s: Received hello from %I via %s\n",p->name,faddr,ifa->iface->name);
if((unsigned)ipa_mklen(ipa_ntoh(ps->netmask))!=ifa->iface->addr->pxlen) if((unsigned)ipa_mklen(ipa_ntoh(ps->netmask))!=ifa->iface->addr->pxlen)
{ {
log("%s%s%I%s%Ibad netmask %I.\n", p->name, beg, nrid, rec, log("%s%s%I%s%Ibad netmask %I.\n", p->name, beg, nrid, rec,
@ -67,25 +69,26 @@ ospf_hello_rx(struct ospf_hello_packet *ps, struct proto *p,
if(ntohs(ps->helloint)!=ifa->helloint) if(ntohs(ps->helloint)!=ifa->helloint)
{ {
log("%s%s%I%shello interval mismatch.\n", p->name, beg, nrid, rec); log("%s%s%I%shello interval mismatch.\n", p->name, beg, faddr, rec);
return; return;
} }
if(ntohl(ps->deadint)!=ifa->helloint*ifa->deadc) if(ntohl(ps->deadint)!=ifa->helloint*ifa->deadc)
{ {
log("%s%s%I%sdead interval mismatch.\n", p->name, beg, nrid, rec); log("%s%s%I%sdead interval mismatch.\n", p->name, beg, faddr, rec);
return; return;
} }
if(ps->options!=ifa->options) if(ps->options!=ifa->options)
{ {
log("%s%s%I%soptions mismatch.\n", p->name, beg, nrid, rec); log("%s%s%I%soptions mismatch.\n", p->name, beg, faddr, rec);
return; return;
} }
if((n=find_neigh(ifa, nrid))==NULL) if((n=find_neigh(ifa, nrid))==NULL)
{ {
debug("%s: New neighbor found: %I.\n", p->name,nrid); debug("%s: New neighbor found: %I on %s.\n", p->name,faddr,
ifa->iface->name);
n=mb_allocz(p->pool, sizeof(struct ospf_neighbor)); n=mb_allocz(p->pool, sizeof(struct ospf_neighbor));
add_tail(&ifa->neigh_list, NODE n); add_tail(&ifa->neigh_list, NODE n);
n->rid=nrid; n->rid=nrid;
@ -128,7 +131,7 @@ ospf_hello_rx(struct ospf_hello_packet *ps, struct proto *p,
{ {
if(ntohl(*(pnrid+i))==p->cf->global->router_id) if(ntohl(*(pnrid+i))==p->cf->global->router_id)
{ {
DBG("%s: Twoway received from %I\n", p->name, nrid); DBG("%s: Twoway received from %I\n", p->name, faddr);
ospf_neigh_sm(n, INM_2WAYREC); ospf_neigh_sm(n, INM_2WAYREC);
twoway=1; twoway=1;
break; break;
@ -223,6 +226,8 @@ hello_timer_hook(timer *timer)
/* And finally send it :-) */ /* And finally send it :-) */
sk_send(ifa->hello_sk,length); sk_send(ifa->hello_sk,length);
} }
debug("%s: Hello sent via %s\n",p->name,ifa->iface->name);
} }
void void