Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186804
b: refs/heads/master
c: 149de2e
h: refs/heads/master
v: v3
  • Loading branch information
Marek Lindner authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent 5e9aadd commit c48ea20
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eb50081d8fb76d5de9d65628d7f41977ece7044b
refs/heads/master: 149de2e58b53cb87c9637a46441c477f0caf74bd
14 changes: 8 additions & 6 deletions trunk/drivers/staging/batman-adv/routing.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,14 +655,15 @@ static int recv_icmp_ttl_exceeded(struct sk_buff *skb)
unsigned long flags;
uint8_t dstaddr[ETH_ALEN];

icmp_packet = (struct icmp_packet *) skb->data;
ethhdr = (struct ethhdr *) skb_mac_header(skb);

printk(KERN_WARNING "batman-adv:Warning - can't send packet from %pM to %pM: ttl exceeded\n", icmp_packet->orig, icmp_packet->dst);
icmp_packet = (struct icmp_packet *)skb->data;
ethhdr = (struct ethhdr *)skb_mac_header(skb);

/* send TTL exceeded if packet is an echo request (traceroute) */
if (icmp_packet->msg_type != ECHO_REQUEST)
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);
return NET_RX_DROP;
}

/* get routing information */
spin_lock_irqsave(&orig_hash_lock, flags);
Expand Down Expand Up @@ -825,7 +826,8 @@ int recv_unicast_packet(struct sk_buff *skb)

/* TTL exceeded */
if (unicast_packet->ttl < 2) {
printk(KERN_WARNING "batman-adv:Warning - can't send packet from %pM to %pM: ttl exceeded\n", ethhdr->h_source, unicast_packet->dest);
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;
}

Expand Down

0 comments on commit c48ea20

Please sign in to comment.