batman-adv: report compat_version in version field in case of version mismatch
authorMarek Lindner <lindner_marek@yahoo.de>
Sun, 30 Oct 2011 21:10:08 +0000 (22:10 +0100)
committerSven Eckelmann <sven@narfation.org>
Sun, 20 Nov 2011 12:08:35 +0000 (13:08 +0100)
Reported-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
net/batman-adv/icmp_socket.c

index ac3520e057c0079d97943433a8df648ac1cc402c..defd6929ceae51a621b8d04288c053611a377b87 100644 (file)
@@ -217,7 +217,7 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff,
 
        if (icmp_packet->version != COMPAT_VERSION) {
                icmp_packet->msg_type = PARAMETER_PROBLEM;
-               icmp_packet->ttl = COMPAT_VERSION;
+               icmp_packet->version = COMPAT_VERSION;
                bat_socket_add_packet(socket_client, icmp_packet, packet_len);
                goto free_skb;
        }