mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
ipv4: Use flowi4 in FIB layer.
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9d6ec93801
commit
9ade22861f
3 changed files with 31 additions and 30 deletions
|
@ -560,16 +560,16 @@ static int fib_check_nh(struct fib_config *cfg, struct fib_info *fi,
|
|||
}
|
||||
rcu_read_lock();
|
||||
{
|
||||
struct flowi fl = {
|
||||
.fl4_dst = nh->nh_gw,
|
||||
.fl4_scope = cfg->fc_scope + 1,
|
||||
.flowi_oif = nh->nh_oif,
|
||||
struct flowi4 fl4 = {
|
||||
.daddr = nh->nh_gw,
|
||||
.flowi4_scope = cfg->fc_scope + 1,
|
||||
.flowi4_oif = nh->nh_oif,
|
||||
};
|
||||
|
||||
/* It is not necessary, but requires a bit of thinking */
|
||||
if (fl.fl4_scope < RT_SCOPE_LINK)
|
||||
fl.fl4_scope = RT_SCOPE_LINK;
|
||||
err = fib_lookup(net, &fl.u.ip4, &res);
|
||||
if (fl4.flowi4_scope < RT_SCOPE_LINK)
|
||||
fl4.flowi4_scope = RT_SCOPE_LINK;
|
||||
err = fib_lookup(net, &fl4, &res);
|
||||
if (err) {
|
||||
rcu_read_unlock();
|
||||
return err;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue