diff options
author | Simon Wunderlich <sw@simonwunderlich.de> | 2013-10-22 22:50:09 +0200 |
---|---|---|
committer | Antonio Quartulli <antonio@meshcoding.com> | 2013-10-23 17:03:47 +0200 |
commit | da6b8c20a5b8c7edce95c95fa2356300691094f5 (patch) | |
tree | 1154c27c3f4e9d62c099044f891441125f965e1f /net/batman-adv/types.h | |
parent | 15c33da6e8c960e61691ec302fd72f247e97055b (diff) | |
download | blackbird-obmc-linux-da6b8c20a5b8c7edce95c95fa2356300691094f5.tar.gz blackbird-obmc-linux-da6b8c20a5b8c7edce95c95fa2356300691094f5.zip |
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>
Diffstat (limited to 'net/batman-adv/types.h')
-rw-r--r-- | net/batman-adv/types.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h index 3c2116274de2..91dd369b0ff2 100644 --- a/net/batman-adv/types.h +++ b/net/batman-adv/types.h @@ -749,7 +749,7 @@ struct batadv_socket_client { struct batadv_socket_packet { struct list_head list; size_t icmp_len; - struct batadv_icmp_packet_rr icmp_packet; + uint8_t icmp_packet[BATADV_ICMP_MAX_PACKET_SIZE]; }; /** |