|
Bugzilla – Full Text Bug Listing |
| Summary: | Icmpv6L4Protocol::ForgeEchoRequest returns a malformed packet | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Tommaso Pecorella <tommaso.pecorella> |
| Component: | ipv6 | Assignee: | Tommaso Pecorella <tommaso.pecorella> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | ns-bugs |
| Priority: | P5 | ||
| Version: | ns-3-dev | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | patch | ||
10819:f49b201c1884 |
Created attachment 1843 [details] patch This function is pretty much useless as it is (and indeed it is never used). The reason is: the returned packet doesn't have an IP header, but the ICMP header is added. However, the ICMP header does not have the right checksum. As a consequence, it is malformed. Not adding the IP header seems a bad choice as well, as the caller will have to add it. This seems trivial, but there is no reason to not do in the function, as the ICMP checksum depends on the IP [pseudo] header. To be clearer, there is no possible use-case for using this function without having to add the right IP header just after. As a consequence, the logical thing is to add the IP header as well, much like all the other "Forge" functions do. This changes the API, but it does for a function that 1) was never used and 2) was bugged. As a consequence, I see no reason preventing the API change.