Open jelischer opened 4 years ago
It turns out that to do this we probably should fix the fact that ICMP never does a Consume() operation on the packet for the transport header, but leaves it in the Data segment. The reason for this is that ICMP processing happens even if the ICMP protocol is not available for use by upper layers and the setting of the header into its own section would normally be done by the upper ICMP code. The answer would be to have it done at the lower ICMP code in network/ipv[46]/icmp.c which is always present.
cc @kevinGC
Yes, there is a confusing coupling between ICMP sockets (enabled via stack.Options.TransportProtocols
) and ICMP handling. They should share code, but the latter shouldn't depend on enabling the former.
For context: this came up when we added early header parsing, but wasn't needed immediately and so nobody allocated cycles for it.
I could add some cycles to it while I have it fully loaded in my head.
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 30 days.
This is done - packet buffers hold the network/transport protocol numbers
There are still 5 TODOs referencing this issue.
A friendly reminder that this issue had no activity for 120 days.
This issue has been closed due to lack of activity.
There are TODOs still referencing this issue:
Search TODO
There are TODOs still referencing this issue:
Search TODO
A friendly reminder that this issue had no activity for 120 days.
Packet headers are now tracked in the packet buffer structure using a special 'header' structure. This structure should maintain what type each header is as well as what layer it is (which is all it has now). In parts of the code where it is important to look at the transport header for example it is expensive to go back to re-examine the IPv6 header to find which kind of transport header is in the transport header storage (tcp? udp? icmp?). Since we already know this information at some stage it is probably worth while to save it with the header.