|
@@ -94,7 +94,11 @@ static void update_route(struct orig_node *orig_node,
|
|
|
|
|
|
/* route changed */
|
|
|
} else {
|
|
|
- bat_dbg(DBG_ROUTES, "Changing route towards: %pM (now via %pM - was via %pM)\n", orig_node->orig, neigh_node->addr, orig_node->router->addr);
|
|
|
+ bat_dbg(DBG_ROUTES,
|
|
|
+ "Changing route towards: %pM "
|
|
|
+ "(now via %pM - was via %pM)\n",
|
|
|
+ orig_node->orig, neigh_node->addr,
|
|
|
+ orig_node->router->addr);
|
|
|
}
|
|
|
|
|
|
orig_node->router = neigh_node;
|
|
@@ -207,7 +211,11 @@ static int isBidirectionalNeigh(struct orig_node *orig_node,
|
|
|
orig_neigh_node->tq_asym_penalty) /
|
|
|
(TQ_MAX_VALUE * TQ_MAX_VALUE));
|
|
|
|
|
|
- bat_dbg(DBG_BATMAN, "bidirectional: orig = %-15pM neigh = %-15pM => own_bcast = %2i, real recv = %2i, local tq: %3i, asym_penalty: %3i, total tq: %3i\n",
|
|
|
+ bat_dbg(DBG_BATMAN,
|
|
|
+ "bidirectional: "
|
|
|
+ "orig = %-15pM neigh = %-15pM => own_bcast = %2i, "
|
|
|
+ "real recv = %2i, local tq: %3i, asym_penalty: %3i, "
|
|
|
+ "total tq: %3i\n",
|
|
|
orig_node->orig, orig_neigh_node->orig, total_count,
|
|
|
neigh_node->real_packet_count, orig_neigh_node->tq_own,
|
|
|
orig_neigh_node->tq_asym_penalty, batman_packet->tq);
|
|
@@ -229,7 +237,8 @@ static void update_orig(struct orig_node *orig_node, struct ethhdr *ethhdr,
|
|
|
struct neigh_node *neigh_node = NULL, *tmp_neigh_node = NULL;
|
|
|
int tmp_hna_buff_len;
|
|
|
|
|
|
- bat_dbg(DBG_BATMAN, "update_originator(): Searching and updating originator entry of received packet\n");
|
|
|
+ bat_dbg(DBG_BATMAN, "update_originator(): "
|
|
|
+ "Searching and updating originator entry of received packet\n");
|
|
|
|
|
|
list_for_each_entry(tmp_neigh_node, &orig_node->neigh_list, list) {
|
|
|
if (compare_orig(tmp_neigh_node->addr, ethhdr->h_source) &&
|
|
@@ -422,7 +431,9 @@ void receive_bat_packet(struct ethhdr *ethhdr,
|
|
|
is_single_hop_neigh = (compare_orig(ethhdr->h_source,
|
|
|
batman_packet->orig) ? 1 : 0);
|
|
|
|
|
|
- bat_dbg(DBG_BATMAN, "Received BATMAN packet via NB: %pM, IF: %s [%s] (from OG: %pM, via prev OG: %pM, seqno %d, tq %d, TTL %d, V %d, IDF %d)\n",
|
|
|
+ bat_dbg(DBG_BATMAN, "Received BATMAN packet via NB: %pM, IF: %s [%s] "
|
|
|
+ "(from OG: %pM, via prev OG: %pM, seqno %d, tq %d, "
|
|
|
+ "TTL %d, V %d, IDF %d)\n",
|
|
|
ethhdr->h_source, if_incoming->dev, if_incoming->addr_str,
|
|
|
batman_packet->orig, batman_packet->prev_sender,
|
|
|
batman_packet->seqno, batman_packet->tq, batman_packet->ttl,
|
|
@@ -457,13 +468,16 @@ void receive_bat_packet(struct ethhdr *ethhdr,
|
|
|
|
|
|
if (is_my_addr) {
|
|
|
bat_dbg(DBG_BATMAN,
|
|
|
- "Drop packet: received my own broadcast (sender: %pM)\n",
|
|
|
+ "Drop packet: received my own broadcast (sender: %pM"
|
|
|
+ ")\n",
|
|
|
ethhdr->h_source);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (is_broadcast) {
|
|
|
- bat_dbg(DBG_BATMAN, "Drop packet: ignoring all packets with broadcast source addr (sender: %pM)\n", ethhdr->h_source);
|
|
|
+ bat_dbg(DBG_BATMAN, "Drop packet: "
|
|
|
+ "ignoring all packets with broadcast source addr (sender: %pM"
|
|
|
+ ")\n", ethhdr->h_source);
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -491,12 +505,15 @@ void receive_bat_packet(struct ethhdr *ethhdr,
|
|
|
bit_packet_count(word);
|
|
|
}
|
|
|
|
|
|
- bat_dbg(DBG_BATMAN, "Drop packet: originator packet from myself (via neighbor)\n");
|
|
|
+ bat_dbg(DBG_BATMAN, "Drop packet: "
|
|
|
+ "originator packet from myself (via neighbor)\n");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (is_my_oldorig) {
|
|
|
- bat_dbg(DBG_BATMAN, "Drop packet: ignoring all rebroadcast echos (sender: %pM)\n", ethhdr->h_source);
|
|
|
+ bat_dbg(DBG_BATMAN,
|
|
|
+ "Drop packet: ignoring all rebroadcast echos (sender: "
|
|
|
+ "%pM)\n", ethhdr->h_source);
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -507,12 +524,15 @@ void receive_bat_packet(struct ethhdr *ethhdr,
|
|
|
is_duplicate = count_real_packets(ethhdr, batman_packet, if_incoming);
|
|
|
|
|
|
if (is_duplicate == -1) {
|
|
|
- bat_dbg(DBG_BATMAN, "Drop packet: packet within seqno protection time (sender: %pM)\n", ethhdr->h_source);
|
|
|
+ bat_dbg(DBG_BATMAN,
|
|
|
+ "Drop packet: packet within seqno protection time "
|
|
|
+ "(sender: %pM)\n", ethhdr->h_source);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (batman_packet->tq == 0) {
|
|
|
- bat_dbg(DBG_BATMAN, "Drop packet: originator packet with tq equal 0\n");
|
|
|
+ bat_dbg(DBG_BATMAN,
|
|
|
+ "Drop packet: originator packet with tq equal 0\n");
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -524,7 +544,9 @@ void receive_bat_packet(struct ethhdr *ethhdr,
|
|
|
!(compare_orig(batman_packet->orig, batman_packet->prev_sender)) &&
|
|
|
(compare_orig(orig_node->router->addr,
|
|
|
orig_node->router->orig_node->router->addr))) {
|
|
|
- bat_dbg(DBG_BATMAN, "Drop packet: ignoring all rebroadcast packets that may make me loop (sender: %pM)\n", ethhdr->h_source);
|
|
|
+ bat_dbg(DBG_BATMAN,
|
|
|
+ "Drop packet: ignoring all rebroadcast packets that "
|
|
|
+ "may make me loop (sender: %pM)\n", ethhdr->h_source);
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -562,7 +584,8 @@ void receive_bat_packet(struct ethhdr *ethhdr,
|
|
|
schedule_forward_packet(orig_node, ethhdr, batman_packet,
|
|
|
1, hna_buff_len, if_incoming);
|
|
|
|
|
|
- bat_dbg(DBG_BATMAN, "Forwarding packet: rebroadcast neighbor packet with direct link flag\n");
|
|
|
+ bat_dbg(DBG_BATMAN, "Forwarding packet: "
|
|
|
+ "rebroadcast neighbor packet with direct link flag\n");
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -708,8 +731,10 @@ static int recv_icmp_ttl_exceeded(struct sk_buff *skb)
|
|
|
|
|
|
/* send TTL exceeded if packet is an echo request (traceroute) */
|
|
|
if (icmp_packet->msg_type != ECHO_REQUEST) {
|
|
|
- printk(KERN_WARNING "batman-adv:Warning - can't forward icmp packet from %pM to %pM: ttl exceeded\n",
|
|
|
- icmp_packet->orig, icmp_packet->dst);
|
|
|
+ printk(KERN_WARNING "batman-adv:"
|
|
|
+ "Warning - can't forward icmp packet from %pM to %pM: "
|
|
|
+ "ttl exceeded\n",
|
|
|
+ icmp_packet->orig, icmp_packet->dst);
|
|
|
return NET_RX_DROP;
|
|
|
}
|
|
|
|
|
@@ -874,7 +899,9 @@ int recv_unicast_packet(struct sk_buff *skb)
|
|
|
|
|
|
/* TTL exceeded */
|
|
|
if (unicast_packet->ttl < 2) {
|
|
|
- printk(KERN_WARNING "batman-adv:Warning - can't forward unicast packet from %pM to %pM: ttl exceeded\n",
|
|
|
+ printk(KERN_WARNING "batman-adv:Warning - "
|
|
|
+ "can't forward unicast packet from %pM to %pM: "
|
|
|
+ "ttl exceeded\n",
|
|
|
ethhdr->h_source, unicast_packet->dest);
|
|
|
return NET_RX_DROP;
|
|
|
}
|