openbsd-ports/net/oproute/patches/patch-oproute_cpp
pvalchev e6156f805a Import of oproute-0.7
The purpose of OpRoute is to attempt to establish a
*generalized* measurement system which takes into
account all of the factors that are usually considered
to be important when it comes to performance.
Specifically:

 - Packet loss
 - Latency
 - Layer 3 Hops
 - AS Hops 
 - NAP Hops
 - Throughput (To be done, not in there yet)

MAINTAINER=	Jason Peel <jsyn@nthought.com>
2001-07-03 02:40:21 +00:00

30 lines
1.1 KiB
Plaintext

$OpenBSD: patch-oproute_cpp,v 1.1.1.1 2001/07/03 02:40:21 pvalchev Exp $
--- oproute.cpp.orig Sun Jun 24 15:41:04 2001
+++ oproute.cpp Sun Jun 24 15:41:40 2001
@@ -706,7 +706,7 @@ void OpRoute::CatchICMP(Hop *pHop)
udp = (struct udphdr *)(recvbuf + hlen1 + 8 +hlen2);
if(hip->ip_p == IPPROTO_UDP)
{
- pHop->nPort = ntohs(udp->dest);
+ pHop->nPort = ntohs(udp->uh_dport);
pHop->sRouterIP = sock_ntop_host((sockaddr *)sa_recv, sa_len);
pHop->state = HOP_COMPLETED;
pHop->fLatency = GetLatencyFromTV(tvNow, tvTimeOfLastSend);
@@ -721,14 +721,14 @@ void OpRoute::CatchICMP(Hop *pHop)
{
if (icmp->icmp_code == ICMP_UNREACH_PORT)
{
- pHop->nPort = ntohs(udp->dest);
+ pHop->nPort = ntohs(udp->uh_dport);
pHop->sRouterIP = sock_ntop_host((sockaddr *)sa_recv, sa_len);
pHop->state = HOP_ENDOFLINE;
pHop->fLatency = GetLatencyFromTV(tvNow, tvTimeOfLastSend);
}
else
{
- pHop->nPort = ntohs(udp->dest);
+ pHop->nPort = ntohs(udp->uh_dport);
pHop->sRouterIP = sock_ntop_host((sockaddr *)sa_recv, sa_len);
pHop->state = HOP_FAILED;
}