* [9fans] error in icmp error packets
@ 2002-10-13 19:11 Richard Miller
0 siblings, 0 replies; 2+ messages in thread
From: Richard Miller @ 2002-10-13 19:11 UTC (permalink / raw)
To: 9fans
Problem: the data section of icmp "port unreachable" and "time exceeded"
packets contains a copy of the headers of the packet being responded to.
In Plan 9 the copy is corrupted, which annoys my firewall and presumably
will not be helpful for the host receiving the icmp packet.
Evidence: see the udp header in the icmp packet shown below.
term% snoopy&
term% con -l udp!192.168.23.1!99 </dev/null
connected to udp!192.168.23.1!99 on /net/udp/0
013159 ms
ether(s=... d=... pr=0800 ln=60)
ip(s=192.168.23.1 d=192.168.23.1 id=9b1c frag=0000 ttl=255 pr=17 ln=28)
udp(s=32455 d=99 ck=d160 ln= 8)
013168 ms
ether(s=... d=... pr=0800 ln=60)
ip(s=192.168.23.1 d=192.168.23.1 id=9b1d frag=0000 ttl=255 pr=17 ln=28)
udp(s=32455 d=99 ck=d160 ln= 8)
013178 ms
ether(s=... d=... pr=0800 ln=70)
ip(s=192.168.23.1 d=192.168.23.1 id=9b1e frag=0000 ttl=255 pr=1 ln=56)
icmp(t=Unreachable c=3 ck=b169)
ip(s=192.168.23.1 d=192.168.23.1 id=9b1c frag=0000 ttl=255 pr=17 ln=28)
udp(s=16384 d=28 ck=0000 ln=39708)
dump(ff117161c0a81701c0a817017ec700630008d160)
Cause: in icmpttlexceeded() and icmpnoconv(), the IP header vihl field
is being initialised (to IP_VER4) in the packet being responded to, not
in the icmp packet being constructed.
Fix:
/sys/src/9/ip/icmp.c:198 d icmp.c:197
< p->vihl = IP_VER4;
/sys/src/9/ip/icmp.c:203 a icmp.c:203
> np->vihl = IP_VER4;
/sys/src/9/ip/icmp.c:227 d icmp.c:226
< p->vihl = IP_VER4;
/sys/src/9/ip/icmp.c:242 a icmp.c:242
> np->vihl = IP_VER4;
-- Richard Miller
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [9fans] error in icmp error packets
@ 2002-10-13 19:27 presotto
0 siblings, 0 replies; 2+ messages in thread
From: presotto @ 2002-10-13 19:27 UTC (permalink / raw)
To: 9fans
[-- Attachment #1: Type: text/plain, Size: 16 bytes --]
thanks, updated.
[-- Attachment #2: Type: message/rfc822, Size: 2806 bytes --]
From: Richard Miller <miller@hamnavoe.demon.co.uk>
To: 9fans@cse.psu.edu
Subject: [9fans] error in icmp error packets
Date: Sun, 13 Oct 2002 20:11:11 +0100
Message-ID: <d833765fccf48e30c4b0df63ea527764@hamnavoe.demon.co.uk>
Problem: the data section of icmp "port unreachable" and "time exceeded"
packets contains a copy of the headers of the packet being responded to.
In Plan 9 the copy is corrupted, which annoys my firewall and presumably
will not be helpful for the host receiving the icmp packet.
Evidence: see the udp header in the icmp packet shown below.
term% snoopy&
term% con -l udp!192.168.23.1!99 </dev/null
connected to udp!192.168.23.1!99 on /net/udp/0
013159 ms
ether(s=... d=... pr=0800 ln=60)
ip(s=192.168.23.1 d=192.168.23.1 id=9b1c frag=0000 ttl=255 pr=17 ln=28)
udp(s=32455 d=99 ck=d160 ln= 8)
013168 ms
ether(s=... d=... pr=0800 ln=60)
ip(s=192.168.23.1 d=192.168.23.1 id=9b1d frag=0000 ttl=255 pr=17 ln=28)
udp(s=32455 d=99 ck=d160 ln= 8)
013178 ms
ether(s=... d=... pr=0800 ln=70)
ip(s=192.168.23.1 d=192.168.23.1 id=9b1e frag=0000 ttl=255 pr=1 ln=56)
icmp(t=Unreachable c=3 ck=b169)
ip(s=192.168.23.1 d=192.168.23.1 id=9b1c frag=0000 ttl=255 pr=17 ln=28)
udp(s=16384 d=28 ck=0000 ln=39708)
dump(ff117161c0a81701c0a817017ec700630008d160)
Cause: in icmpttlexceeded() and icmpnoconv(), the IP header vihl field
is being initialised (to IP_VER4) in the packet being responded to, not
in the icmp packet being constructed.
Fix:
/sys/src/9/ip/icmp.c:198 d icmp.c:197
< p->vihl = IP_VER4;
/sys/src/9/ip/icmp.c:203 a icmp.c:203
> np->vihl = IP_VER4;
/sys/src/9/ip/icmp.c:227 d icmp.c:226
< p->vihl = IP_VER4;
/sys/src/9/ip/icmp.c:242 a icmp.c:242
> np->vihl = IP_VER4;
-- Richard Miller
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-10-13 19:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-13 19:11 [9fans] error in icmp error packets Richard Miller
2002-10-13 19:27 presotto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).