Skip to content

Commit

Permalink
batman-adv: print packets re-routing on DBG_TT and ratelimit it
Browse files Browse the repository at this point in the history
To simplify TranslationTable debugging it is better to print the packet
rerouting message on the DBG_TT log level. In this way a developer interested in
packets rerouting doesn't need to filter it out of the whole ROUTES log.

Moreover, since this message will appear for each rerouted message, it is now
"ratelimited".

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
  • Loading branch information
Antonio Quartulli committed Oct 29, 2012
1 parent fdf7932 commit 60c39c7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/batman-adv/routing.c
Original file line number Diff line number Diff line change
Expand Up @@ -965,10 +965,10 @@ static int batadv_check_unicast_ttvn(struct batadv_priv *bat_priv,
batadv_orig_node_free_ref(orig_node);
}

batadv_dbg(BATADV_DBG_ROUTES, bat_priv,
"TTVN mismatch (old_ttvn %u new_ttvn %u)! Rerouting unicast packet (for %pM) to %pM\n",
unicast_packet->ttvn, curr_ttvn, ethhdr->h_dest,
unicast_packet->dest);
net_ratelimited_function(batadv_dbg, BATADV_DBG_TT, bat_priv,
"TTVN mismatch (old_ttvn %u new_ttvn %u)! Rerouting unicast packet (for %pM) to %pM\n",
unicast_packet->ttvn, curr_ttvn,
ethhdr->h_dest, unicast_packet->dest);

unicast_packet->ttvn = curr_ttvn;
}
Expand Down

0 comments on commit 60c39c7

Please sign in to comment.