Loading Documentation/networking/batman-adv.txt +4 −3 Original line number Original line Diff line number Diff line Loading @@ -200,15 +200,16 @@ abled during run time. Following log_levels are defined: 0 - All debug output disabled 0 - All debug output disabled 1 - Enable messages related to routing / flooding / broadcasting 1 - Enable messages related to routing / flooding / broadcasting 2 - Enable route or tt entry added / changed / deleted 2 - Enable messages related to route added / changed / deleted 3 - Enable all messages 4 - Enable messages related to translation table operations 7 - Enable all messages The debug output can be changed at runtime using the file The debug output can be changed at runtime using the file /sys/class/net/bat0/mesh/log_level. e.g. /sys/class/net/bat0/mesh/log_level. e.g. # echo 2 > /sys/class/net/bat0/mesh/log_level # echo 2 > /sys/class/net/bat0/mesh/log_level will enable debug messages for when routes or TTs change. will enable debug messages for when routes change. BATCTL BATCTL Loading net/batman-adv/gateway_client.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -695,7 +695,7 @@ bool gw_out_of_range(struct bat_priv *bat_priv, } } neigh_old = find_router(bat_priv, orig_dst_node, NULL); neigh_old = find_router(bat_priv, orig_dst_node, NULL); if (!!neigh_old) if (!neigh_old) goto out; goto out; if (curr_tq_avg - neigh_old->tq_avg > GW_THRESHOLD) if (curr_tq_avg - neigh_old->tq_avg > GW_THRESHOLD) Loading net/batman-adv/icmp_socket.c +4 −10 Original line number Original line Diff line number Diff line Loading @@ -136,10 +136,9 @@ static ssize_t bat_socket_read(struct file *file, char __user *buf, spin_unlock_bh(&socket_client->lock); spin_unlock_bh(&socket_client->lock); error = __copy_to_user(buf, &socket_packet->icmp_packet, packet_len = min(count, socket_packet->icmp_len); socket_packet->icmp_len); error = copy_to_user(buf, &socket_packet->icmp_packet, packet_len); packet_len = socket_packet->icmp_len; kfree(socket_packet); kfree(socket_packet); if (error) if (error) Loading Loading @@ -187,12 +186,7 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff, skb_reserve(skb, sizeof(struct ethhdr)); skb_reserve(skb, sizeof(struct ethhdr)); icmp_packet = (struct icmp_packet_rr *)skb_put(skb, packet_len); icmp_packet = (struct icmp_packet_rr *)skb_put(skb, packet_len); if (!access_ok(VERIFY_READ, buff, packet_len)) { if (copy_from_user(icmp_packet, buff, packet_len)) { len = -EFAULT; goto free_skb; } if (__copy_from_user(icmp_packet, buff, packet_len)) { len = -EFAULT; len = -EFAULT; goto free_skb; goto free_skb; } } Loading @@ -217,7 +211,7 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff, if (icmp_packet->version != COMPAT_VERSION) { if (icmp_packet->version != COMPAT_VERSION) { icmp_packet->msg_type = PARAMETER_PROBLEM; 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); bat_socket_add_packet(socket_client, icmp_packet, packet_len); goto free_skb; goto free_skb; } } Loading net/batman-adv/routing.c +1 −2 Original line number Original line Diff line number Diff line Loading @@ -627,8 +627,7 @@ int recv_tt_query(struct sk_buff *skb, struct hard_iface *recv_if) /* Ensure we have all the claimed data */ /* Ensure we have all the claimed data */ if (unlikely(skb_headlen(skb) < if (unlikely(skb_headlen(skb) < sizeof(struct tt_query_packet) + sizeof(struct tt_query_packet) + tt_len)) tt_len)) goto out; goto out; handle_tt_response(bat_priv, tt_query); handle_tt_response(bat_priv, tt_query); Loading net/batman-adv/soft-interface.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -874,7 +874,7 @@ struct net_device *softif_create(const char *name) unreg_sysfs: unreg_sysfs: sysfs_del_meshif(soft_iface); sysfs_del_meshif(soft_iface); unreg_soft_iface: unreg_soft_iface: unregister_netdev(soft_iface); unregister_netdevice(soft_iface); return NULL; return NULL; free_soft_iface: free_soft_iface: Loading Loading
Documentation/networking/batman-adv.txt +4 −3 Original line number Original line Diff line number Diff line Loading @@ -200,15 +200,16 @@ abled during run time. Following log_levels are defined: 0 - All debug output disabled 0 - All debug output disabled 1 - Enable messages related to routing / flooding / broadcasting 1 - Enable messages related to routing / flooding / broadcasting 2 - Enable route or tt entry added / changed / deleted 2 - Enable messages related to route added / changed / deleted 3 - Enable all messages 4 - Enable messages related to translation table operations 7 - Enable all messages The debug output can be changed at runtime using the file The debug output can be changed at runtime using the file /sys/class/net/bat0/mesh/log_level. e.g. /sys/class/net/bat0/mesh/log_level. e.g. # echo 2 > /sys/class/net/bat0/mesh/log_level # echo 2 > /sys/class/net/bat0/mesh/log_level will enable debug messages for when routes or TTs change. will enable debug messages for when routes change. BATCTL BATCTL Loading
net/batman-adv/gateway_client.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -695,7 +695,7 @@ bool gw_out_of_range(struct bat_priv *bat_priv, } } neigh_old = find_router(bat_priv, orig_dst_node, NULL); neigh_old = find_router(bat_priv, orig_dst_node, NULL); if (!!neigh_old) if (!neigh_old) goto out; goto out; if (curr_tq_avg - neigh_old->tq_avg > GW_THRESHOLD) if (curr_tq_avg - neigh_old->tq_avg > GW_THRESHOLD) Loading
net/batman-adv/icmp_socket.c +4 −10 Original line number Original line Diff line number Diff line Loading @@ -136,10 +136,9 @@ static ssize_t bat_socket_read(struct file *file, char __user *buf, spin_unlock_bh(&socket_client->lock); spin_unlock_bh(&socket_client->lock); error = __copy_to_user(buf, &socket_packet->icmp_packet, packet_len = min(count, socket_packet->icmp_len); socket_packet->icmp_len); error = copy_to_user(buf, &socket_packet->icmp_packet, packet_len); packet_len = socket_packet->icmp_len; kfree(socket_packet); kfree(socket_packet); if (error) if (error) Loading Loading @@ -187,12 +186,7 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff, skb_reserve(skb, sizeof(struct ethhdr)); skb_reserve(skb, sizeof(struct ethhdr)); icmp_packet = (struct icmp_packet_rr *)skb_put(skb, packet_len); icmp_packet = (struct icmp_packet_rr *)skb_put(skb, packet_len); if (!access_ok(VERIFY_READ, buff, packet_len)) { if (copy_from_user(icmp_packet, buff, packet_len)) { len = -EFAULT; goto free_skb; } if (__copy_from_user(icmp_packet, buff, packet_len)) { len = -EFAULT; len = -EFAULT; goto free_skb; goto free_skb; } } Loading @@ -217,7 +211,7 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff, if (icmp_packet->version != COMPAT_VERSION) { if (icmp_packet->version != COMPAT_VERSION) { icmp_packet->msg_type = PARAMETER_PROBLEM; 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); bat_socket_add_packet(socket_client, icmp_packet, packet_len); goto free_skb; goto free_skb; } } Loading
net/batman-adv/routing.c +1 −2 Original line number Original line Diff line number Diff line Loading @@ -627,8 +627,7 @@ int recv_tt_query(struct sk_buff *skb, struct hard_iface *recv_if) /* Ensure we have all the claimed data */ /* Ensure we have all the claimed data */ if (unlikely(skb_headlen(skb) < if (unlikely(skb_headlen(skb) < sizeof(struct tt_query_packet) + sizeof(struct tt_query_packet) + tt_len)) tt_len)) goto out; goto out; handle_tt_response(bat_priv, tt_query); handle_tt_response(bat_priv, tt_query); Loading
net/batman-adv/soft-interface.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -874,7 +874,7 @@ struct net_device *softif_create(const char *name) unreg_sysfs: unreg_sysfs: sysfs_del_meshif(soft_iface); sysfs_del_meshif(soft_iface); unreg_soft_iface: unreg_soft_iface: unregister_netdev(soft_iface); unregister_netdevice(soft_iface); return NULL; return NULL; free_soft_iface: free_soft_iface: Loading