On 03/18/2018 09:15 AM, Sven Eckelmann wrote:
On Freitag, 16. März 2018 11:29:11 CET Matthias Schiffer wrote:
batadv_check_unicast_ttvn() may modify the batadv header, leading to checksum errors in the following processing of the packet.
Rather than fixing up the checksum, simply pull the batadv header before modifying it (and push it back in case the packet is rerouted).
Signed-off-by: Matthias Schiffer mschiffer@universe-factory.net
This patch is so invasive that it breaks the batadv_dbg_arp check which you've just fixed a patch before.
Kind regards, Sven
Yes, it's the main reason I improved the check; I should have mentioned that in the commit message. As mentioned on IRC, batadv_dbg_arp will still print what information is added to the DAT cache, but it can't tell which batadv packet type the ARP packet was encapsulated in anymore (this information is still available through `batctl td`).
In my further cleanup patches, I plan to
* make the broadcast case match as well (pull before calling snooping functions) * move snooping calls to batadv_interface_rx * remove header size argument from incoming snooping functions (will always be 0) * remove the now dead code from batadv_dbg_arp
This will improve symmetry between the incoming and outgoing snooping paths.
Matthias