Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8909
b: refs/heads/master
c: cd0bf2d
h: refs/heads/master
i:
  8907: 97aa428
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Sep 13, 2005
1 parent 7429a60 commit d72eb52
Show file tree
Hide file tree
Showing 2 changed files with 11 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: e7fa1bd93f977c03050bd6b3d13846aa43310fef
refs/heads/master: cd0bf2d796ebb51c346b1ed4208cdbfd86e98a61
16 changes: 10 additions & 6 deletions trunk/net/ipv4/netfilter/ipt_REDIRECT.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,18 @@ redirect_target(struct sk_buff **pskb,
newdst = htonl(0x7F000001);
else {
struct in_device *indev;
struct in_ifaddr *ifa;

/* Device might not have an associated in_device. */
indev = (struct in_device *)(*pskb)->dev->ip_ptr;
if (indev == NULL || indev->ifa_list == NULL)
return NF_DROP;
newdst = 0;

rcu_read_lock();
indev = __in_dev_get((*pskb)->dev);
if (indev && (ifa = indev->ifa_list))
newdst = ifa->ifa_local;
rcu_read_unlock();

/* Grab first address on interface. */
newdst = indev->ifa_list->ifa_local;
if (!newdst)
return NF_DROP;
}

/* Transfer from original range. */
Expand Down

0 comments on commit d72eb52

Please sign in to comment.