Marek Lindner schrieb:
I don't think it will be necessary to change the packet size dynamically. The gain will be rather small compared to the overhead it creates. However, it would make sense to specify 2 different icmp structs and only send the large packet when RR is really needed.
Sounds good, I'll prepare a new version of the patch.
- /* add record route information if not full */
- if (icmp_packet->rr_cur && icmp_packet->rr_cur < BAT_RR_LEN / ETH_ALEN) {
memcpy(&(icmp_packet->rr[icmp_packet->rr_cur * ETH_ALEN]),
ethhdr->h_dest, ETH_ALEN);
icmp_packet->rr_cur++;
- }
It would be better to check for the actual packet size rather than the BAT_RR_LEN define. Some node might have sent us an icmp packet which had a different size and then we crash here (or worse).
You're right, I'll change this.
Regards, Daniel