diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-12 02:02:42 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-12 18:08:49 -0500 |
commit | 9ade22861f922344788321e374c542c92bc049b6 (patch) | |
tree | c0bc23180b3f51104745d263a106c62b4bec11a4 /net/ipv4/fib_rules.c | |
parent | 9d6ec938019c6b16cb9ec96598ebe8f20de435fe (diff) |
ipv4: Use flowi4 in FIB layer.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_rules.c')
-rw-r--r-- | net/ipv4/fib_rules.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c index 0c63c4ab0936..a53bb1b5b118 100644 --- a/net/ipv4/fib_rules.c +++ b/net/ipv4/fib_rules.c | |||
@@ -106,14 +106,15 @@ errout: | |||
106 | static int fib4_rule_match(struct fib_rule *rule, struct flowi *fl, int flags) | 106 | static int fib4_rule_match(struct fib_rule *rule, struct flowi *fl, int flags) |
107 | { | 107 | { |
108 | struct fib4_rule *r = (struct fib4_rule *) rule; | 108 | struct fib4_rule *r = (struct fib4_rule *) rule; |
109 | __be32 daddr = fl->fl4_dst; | 109 | struct flowi4 *fl4 = &fl->u.ip4; |
110 | __be32 saddr = fl->fl4_src; | 110 | __be32 daddr = fl4->daddr; |
111 | __be32 saddr = fl4->saddr; | ||
111 | 112 | ||
112 | if (((saddr ^ r->src) & r->srcmask) || | 113 | if (((saddr ^ r->src) & r->srcmask) || |
113 | ((daddr ^ r->dst) & r->dstmask)) | 114 | ((daddr ^ r->dst) & r->dstmask)) |
114 | return 0; | 115 | return 0; |
115 | 116 | ||
116 | if (r->tos && (r->tos != fl->fl4_tos)) | 117 | if (r->tos && (r->tos != fl4->flowi4_tos)) |
117 | return 0; | 118 | return 0; |
118 | 119 | ||
119 | return 1; | 120 | return 1; |