Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 314534 Details for
Bug 249001
traceroute incorrectly reports MPLS information in ICMP unreachable as icmp checksum wrong
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
The patch ensures the MPLS data are not included to the chk_sum function.
traceroute-1.4a12-cksumfix.patch (text/plain), 1.08 KB, created by
Jiri Skala
on 2008-08-19 12:06:27 UTC
(
hide
)
Description:
The patch ensures the MPLS data are not included to the chk_sum function.
Filename:
MIME Type:
Creator:
Jiri Skala
Created:
2008-08-19 12:06:27 UTC
Size:
1.08 KB
patch
obsolete
>diff -up traceroute-1.4a12/traceroute.c.cksumfix traceroute-1.4a12/traceroute.c >--- traceroute-1.4a12/traceroute.c.cksumfix 2008-06-12 09:33:14.000000000 +0200 >+++ traceroute-1.4a12/traceroute.c 2008-06-12 09:40:05.000000000 +0200 >@@ -1492,13 +1492,25 @@ packet_ok(register u_char *buf, int cc, > } > cc -= hlen; > icp = (struct icmp *)(buf + hlen); >+ >+ // get number of bytes to calculate checksum >+ int cksum_len = htons(ip->ip_len) - hlen; >+ >+ // get number of bytes in the inner ip >+ struct ip *hip = (struct ip *)(buf + hlen + sizeof(struct icmphdr)); >+ int sub_len = htons(hip->ip_len) + sizeof(struct icmphdr); >+ >+ // the inner ip is whole in the response => use it to calculate checksum >+ if (sub_len < cksum_len) >+ cksum_len = sub_len; >+ >+ // test checksum >+ if (in_cksum((u_short *)icp, cksum_len)) >+ fprintf(stderr, "Icmp checksum is wrong\n"); > #else > icp = (struct icmp *)buf; > #endif > >- if (in_cksum((u_short *)icp, htons(ip->ip_len) - hlen)) >- fprintf(stderr, "Icmp checksum is wrong\n"); >- > type = icp->icmp_type; > code = icp->icmp_code; > /* Path MTU Discovery (RFC1191) */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 249001
:
308811
| 314534