]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: generalize batman-adv icmp packet handling
authorSimon Wunderlich <sw@simonwunderlich.de>
Tue, 22 Oct 2013 20:50:09 +0000 (22:50 +0200)
committerAntonio Quartulli <antonio@meshcoding.com>
Wed, 23 Oct 2013 15:03:47 +0000 (17:03 +0200)
commite8085a15eac373033856fd1d25bf648d6fdc8d66
tree1154c27c3f4e9d62c099044f891441125f965e1f
parentc02f21edf4f8ddf1f2af278495bda5cd13c1c142
batman-adv: generalize batman-adv icmp packet handling

Instead of handling icmp packets only up to length of icmp_packet_rr,
the code should handle any icmp length size. Therefore the length
truncating is moved to when the packet is actually sent to userspace
(this does not support lengths longer than icmp_packet_rr yet). Longer
packets are forwarded without truncating.

This patch also cleans up some parts where the icmp header struct could
be used instead of other icmp_packet(_rr) structs to make the code more
readable.

Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
net/batman-adv/icmp_socket.c
net/batman-adv/icmp_socket.h
net/batman-adv/packet.h
net/batman-adv/routing.c
net/batman-adv/types.h