Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 214797
b: refs/heads/master
c: 4465b46
h: refs/heads/master
i:
  214795: f7c2716
v: v3
  • Loading branch information
Tom Herbert authored and David S. Miller committed Sep 29, 2010
1 parent 65616e8 commit 195c6a1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 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: fc34ecd07f15358e2b29620fafeb8a6a9528ce79
refs/heads/master: 4465b469008bc03b98a1b8df4e9ae501b6c69d4b
1 change: 1 addition & 0 deletions trunk/include/net/flow.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ struct flowi {
__u8 proto;
__u8 flags;
#define FLOWI_FLAG_ANYSRC 0x01
#define FLOWI_FLAG_MATCH_ANY_IIF 0x02
union {
struct {
__be16 sport;
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/core/fib_rules.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ static int fib_rule_match(struct fib_rule *rule, struct fib_rules_ops *ops,
{
int ret = 0;

if (rule->iifindex && (rule->iifindex != fl->iif))
if (rule->iifindex && (rule->iifindex != fl->iif) &&
!(fl->flags & FLOWI_FLAG_MATCH_ANY_IIF))
goto out;

if (rule->oifindex && (rule->oifindex != fl->oif))
Expand Down
7 changes: 3 additions & 4 deletions trunk/net/ipv4/fib_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,17 +153,16 @@ static void fib_flush(struct net *net)

struct net_device * ip_dev_find(struct net *net, __be32 addr)
{
struct flowi fl = { .nl_u = { .ip4_u = { .daddr = addr } } };
struct flowi fl = { .nl_u = { .ip4_u = { .daddr = addr } },
.flags = FLOWI_FLAG_MATCH_ANY_IIF };
struct fib_result res;
struct net_device *dev = NULL;
struct fib_table *local_table;

#ifdef CONFIG_IP_MULTIPLE_TABLES
res.r = NULL;
#endif

local_table = fib_get_table(net, RT_TABLE_LOCAL);
if (!local_table || fib_table_lookup(local_table, &fl, &res))
if (fib_lookup(net, &fl, &res))
return NULL;
if (res.type != RTN_LOCAL)
goto out;
Expand Down

0 comments on commit 195c6a1

Please sign in to comment.