Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315139
b: refs/heads/master
c: 99ee038
h: refs/heads/master
i:
  315137: caa211e
  315135: 58b06f4
v: v3
  • Loading branch information
David S. Miller committed Jul 12, 2012
1 parent 223e8c1 commit 78b0bba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: 3ec5a261aef55a32664bffd335e5c32aeadf3215
refs/heads/master: 99ee038d41ebbb442921b6d388d08e907b037dac
10 changes: 6 additions & 4 deletions trunk/net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1275,12 +1275,9 @@ static void rt_del(unsigned int hash, struct rtable *rt)

static void ip_do_redirect(struct dst_entry *dst, struct sk_buff *skb)
{
const struct iphdr *iph = (const struct iphdr *) skb->data;
__be32 new_gw = icmp_hdr(skb)->un.gateway;
__be32 old_gw = ip_hdr(skb)->saddr;
struct net_device *dev = skb->dev;
__be32 daddr = iph->daddr;
__be32 saddr = iph->saddr;
struct in_device *in_dev;
struct neighbour *n;
struct rtable *rt;
Expand Down Expand Up @@ -1336,11 +1333,16 @@ static void ip_do_redirect(struct dst_entry *dst, struct sk_buff *skb)

reject_redirect:
#ifdef CONFIG_IP_ROUTE_VERBOSE
if (IN_DEV_LOG_MARTIANS(in_dev))
if (IN_DEV_LOG_MARTIANS(in_dev)) {
const struct iphdr *iph = (const struct iphdr *) skb->data;
__be32 daddr = iph->daddr;
__be32 saddr = iph->saddr;

net_info_ratelimited("Redirect from %pI4 on %s about %pI4 ignored\n"
" Advised path = %pI4 -> %pI4\n",
&old_gw, dev->name, &new_gw,
&saddr, &daddr);
}
#endif
;
}
Expand Down

0 comments on commit 78b0bba

Please sign in to comment.