From: Jorge Matias (terhi.victor@logonet.com)
Date: Thu Nov 02 2000 - 21:57:18 EET
On Tue, 31 Oct 2000, Craig Small wrote:
> > checksum exactly equal to received checksum.
> That was the problem, I though I fixed it/ What version of rspfd.c
> do you have?
> cvs status rspfd.c
> I have 1.4 here.
Yes, it is 1.4.
>
> Does line 533 look like:
> if (rspf_check((unsigned char*)rrh, length, saddr ,daddr) != rrh->checksum && !wrong_version) {
Exactly like that, but in that line it should test if rspf_check returns a
number different from 0. The function rspfd_check must return 0 if
checksum is ok.
Check out the attached patch file to CVS version.
After studying the "checksum" algorithm and after testing it in a piece
of paper I have verified some problems you have:
- When you have an oddbyte to add to the sum, you should only sum that
byte, not what is outside the header because it is trash ( & 0xff );
This happens to RRHs because they have 11 bytes long.
If you want I'll explain better the changes. The checksum is working
between 3 computers. I should check with other softwares that implement
RSPF to see if the checksum is really correct.
Now there are other bigger problems to solve. Here's a report:
(This report is a bit long)
rspfd: Debug mode set to 2.
rspfd: RSPF RSPFd: v1.1 4 May 1999 by Craig Small
<zawkp@shs.is>
started
rspfd: get_my_bull(): Have 4096 byte buffer,
used 8 bytes.
send_rspf_env(): Sending packet 8 bytes, 1 nodes onto port scc0.
send_rspf_env(): Node 1 has 0 links, header at 0 bytes.
add_outfrag(): Block copying 8 bytes into buffer for frag 1.
send_rspf_env(): Have 1 fragments.
send_rspf_env(): Sending packet 8 bytes, 1 nodes onto port scc2.
send_rspf_env(): Node 1 has 0 links, header at 0 bytes.
add_outfrag(): Block copying 8 bytes into buffer for frag 1.
send_rspf_env(): Have 1 fragments.
send_rspf_env(): Sending packet 8 bytes, 1 nodes onto port scc3.
send_rspf_env(): Node 1 has 0 links, header at 0 bytes.
add_outfrag(): Block copying 8 bytes into buffer for frag 1.
send_rspf_env(): Have 1 fragments.
check_routers(): id = 0.
rspfd: recv_rspf_frag(): Got Envelope 70 (frag 1/1) from 44.158.26.19.
rspfd: recv_rspf_frag(): Got our routing bull for iface scc0 on iface scc3
(ignoring).
rspfd: Routing bull 0:0 from us! (We have 1:0)
rspfd: Received poll from 44.158.26.19.
rspfd: get_rtr_bull(): addr = 44.158.18.1, buflen = 2048.
rspfd: get_my_bull(): Have 2048 byte buffer,
used 8 bytes.
rspfd: clean_dead_links(): entering function
rspfd: clean_dead_links(): exiting function.
send_rspf_env(): Sending packet 8 bytes, 1 nodes onto port scc3.
send_rspf_env(): Node 1 has 0 links, header at 0 bytes.
add_outfrag(): Block copying 8 bytes into buffer for frag 1.
send_rspf_env(): Have 1 fragments.
rspfd: sus_adjacency(): Attempting to ping 44.158.26.19 on port scc3 .
rspfd: get_my_bull(): Have 4096 byte buffer,
used 8 bytes.
send_rspf_env(): Sending packet 8 bytes, 1 nodes onto port scc3.
send_rspf_env(): Node 1 has 0 links, header at 0 bytes.
add_outfrag(): Block copying 8 bytes into buffer for frag 1.
send_rspf_env(): Have 1 fragments.
rspfd: recv_rspf_frag(): Got Envelope 71 (frag 1/1) from 44.158.26.19.
rspfd: Routing bull 26:1 from new router 44.158.26.19. <new>
rspfd: get_rtr_bull(): addr = 44.158.26.19, buflen = 2048.
rspfd: get_rtr_bull(): Cannot find router 44.158.26.19
rspfd: clean_dead_links(): entering function
rspfd: clean_dead_links(): exiting function.
rspfd: recv_rspf_frag(): Got Envelope 72 (frag 1/1) from 44.158.26.19.
rspfd: Routing bull 26:2 from new router 44.158.26.19. <new>
rspfd: get_rtr_bull(): addr = 44.158.26.19, buflen = 2048.
rspfd: get_rtr_bull(): Cannot find router 44.158.26.19
rspfd: clean_dead_links(): entering function
rspfd: clean_dead_links(): exiting function.
add_route(): addr = 44.158.26.19/32 gate = NONE cost 1.
Not adding route, already have static one in kernel table.
rspfd: send_ping(): ioctl to restor route failed. (File exists)
send_rspf_env(): Sending packet 17 bytes, 1 nodes onto port scc0.
send_rspf_env(): Node 1 has 1 links, header at 0 bytes.
send_rspf_env(): Link 1 of node 1 has 1 adjacencies, header at 8 bytes.
add_outfrag(): Block copying 17 bytes into buffer for frag 1.
send_rspf_env(): Have 1 fragments.
send_rspf_env(): Sending packet 17 bytes, 1 nodes onto port scc2.
send_rspf_env(): Node 1 has 1 links, header at 0 bytes.
send_rspf_env(): Link 1 of node 1 has 1 adjacencies, header at 8 bytes.
add_outfrag(): Block copying 17 bytes into buffer for frag 1.
send_rspf_env(): Have 1 fragments.
send_rspf_env(): Sending packet 17 bytes, 1 nodes onto port scc3.
send_rspf_env(): Node 1 has 1 links, header at 0 bytes.
send_rspf_env(): Link 1 of node 1 has 1 adjacencies, header at 8 bytes.
add_outfrag(): Block copying 17 bytes into buffer for frag 1.
send_rspf_env(): Have 1 fragments.
send_rspf_env(): Sending packet 17 bytes, 1 nodes onto port scc0.
send_rspf_env(): Node 1 has 1 links, header at 0 bytes.
send_rspf_env(): Link 1 of node 1 has 1 adjacencies, header at 8 bytes.
add_outfrag(): Block copying 17 bytes into buffer for frag 1.
send_rspf_env(): Have 1 fragments.
send_rspf_env(): Sending packet 17 bytes, 1 nodes onto port scc2.
send_rspf_env(): Node 1 has 1 links, header at 0 bytes.
send_rspf_env(): Link 1 of node 1 has 1 adjacencies, header at 8 bytes.
add_outfrag(): Block copying 17 bytes into buffer for frag 1.
send_rspf_env(): Have 1 fragments.
send_rspf_env(): Sending packet 17 bytes, 1 nodes onto port scc3.
send_rspf_env(): Node 1 has 1 links, header at 0 bytes.
send_rspf_env(): Link 1 of node 1 has 1 adjacencies, header at 8 bytes.
add_outfrag(): Block copying 17 bytes into buffer for frag 1.
send_rspf_env(): Have 1 fragments.
rspfd: do_spf(): entering function
add_route(): addr = 44.158.26.19/32 gate = NONE cost 2.
Not adding route, already have static one in kernel table.
add_route(): addr = 44.158.18.1/32 gate = 44.158.26.19 cost 3.
Not adding route to myself!
rspfd: do_spf(): exiting function.
Well, that's it. I hope you find what's wrong with route add/delete,
etc...
The only thing that really works is that addition to the routing table
of adjacencies heard and tested with pings.
Good work!
Regards,
Jorge Matias
>
> - Craig
>
> --
> Craig Small VK2XLZ GnuPG:1C1B D893 1418 2AF4 45EE 95CB C76C E5AC 12CA DFA5
> Eye-Net Consulting http://www.eye-net.com.au/ <wbyqd@mailit.tunk.net>
> MIEEE <terhi.victor@logonet.com> Debian developer <jyy@cbbanorte.com.mx>
>
This archive was generated by hypermail 2b30 : Thu Nov 02 2000 - 21:58:34 EET