Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45217
b: refs/heads/master
c: c68b8b6
h: refs/heads/master
i:
  45215: 446ad21
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jan 4, 2007
1 parent 6c251b3 commit 2aa71d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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: e5b5ef7d2b3fa364cb03407c432ae9979657aa6c
refs/heads/master: c68b8b687f9e3afff14b88327e17901fff0478ca
7 changes: 5 additions & 2 deletions trunk/net/ipv4/netfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@ int ip_route_me_harder(struct sk_buff **pskb, unsigned addr_type)
struct flowi fl = {};
struct dst_entry *odst;
unsigned int hh_len;
unsigned int type;

type = inet_addr_type(iph->saddr);
if (addr_type == RTN_UNSPEC)
addr_type = inet_addr_type(iph->saddr);
addr_type = type;

/* some non-standard hacks like ipt_REJECT.c:send_reset() can cause
* packets with foreign saddr to appear on the NF_IP_LOCAL_OUT hook.
*/
if (addr_type == RTN_LOCAL) {
fl.nl_u.ip4_u.daddr = iph->daddr;
fl.nl_u.ip4_u.saddr = iph->saddr;
if (type == RTN_LOCAL)
fl.nl_u.ip4_u.saddr = iph->saddr;
fl.nl_u.ip4_u.tos = RT_TOS(iph->tos);
fl.oif = (*pskb)->sk ? (*pskb)->sk->sk_bound_dev_if : 0;
fl.mark = (*pskb)->mark;
Expand Down

0 comments on commit 2aa71d5

Please sign in to comment.