]> 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)
commit25f9411f988a19424aec02f1bc78dbdfbb5ee079
tree1154c27c3f4e9d62c099044f891441125f965e1f
parent66233b610471fdd4fea43bb8381e32c49ce5b55a
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