Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
da91981b
Commit
da91981b
authored
Mar 12, 2011
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ipv4: Use flowi4 in ipmr code.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
9ade2286
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
net/ipv4/ipmr.c
net/ipv4/ipmr.c
+17
-16
No files found.
net/ipv4/ipmr.c
View file @
da91981b
...
...
@@ -148,14 +148,15 @@ static struct mr_table *ipmr_get_table(struct net *net, u32 id)
return
NULL
;
}
static
int
ipmr_fib_lookup
(
struct
net
*
net
,
struct
flowi
*
flp
,
static
int
ipmr_fib_lookup
(
struct
net
*
net
,
struct
flowi
4
*
flp4
,
struct
mr_table
**
mrt
)
{
struct
ipmr_result
res
;
struct
fib_lookup_arg
arg
=
{
.
result
=
&
res
,
};
int
err
;
err
=
fib_rules_lookup
(
net
->
ipv4
.
mr_rules_ops
,
flp
,
0
,
&
arg
);
err
=
fib_rules_lookup
(
net
->
ipv4
.
mr_rules_ops
,
flowi4_to_flowi
(
flp4
),
0
,
&
arg
);
if
(
err
<
0
)
return
err
;
*
mrt
=
res
.
mrt
;
...
...
@@ -283,7 +284,7 @@ static struct mr_table *ipmr_get_table(struct net *net, u32 id)
return
net
->
ipv4
.
mrt
;
}
static
int
ipmr_fib_lookup
(
struct
net
*
net
,
struct
flowi
*
flp
,
static
int
ipmr_fib_lookup
(
struct
net
*
net
,
struct
flowi
4
*
flp4
,
struct
mr_table
**
mrt
)
{
*
mrt
=
net
->
ipv4
.
mrt
;
...
...
@@ -435,14 +436,14 @@ static netdev_tx_t reg_vif_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct
net
*
net
=
dev_net
(
dev
);
struct
mr_table
*
mrt
;
struct
flowi
fl
=
{
.
flowi_oif
=
dev
->
ifindex
,
.
flowi_iif
=
skb
->
skb_iif
,
.
flowi_mark
=
skb
->
mark
,
struct
flowi
4
fl4
=
{
.
flowi
4
_oif
=
dev
->
ifindex
,
.
flowi
4
_iif
=
skb
->
skb_iif
,
.
flowi
4
_mark
=
skb
->
mark
,
};
int
err
;
err
=
ipmr_fib_lookup
(
net
,
&
fl
,
&
mrt
);
err
=
ipmr_fib_lookup
(
net
,
&
fl
4
,
&
mrt
);
if
(
err
<
0
)
{
kfree_skb
(
skb
);
return
err
;
...
...
@@ -1789,18 +1790,18 @@ static int ip_mr_forward(struct net *net, struct mr_table *mrt,
static
struct
mr_table
*
ipmr_rt_fib_lookup
(
struct
net
*
net
,
struct
rtable
*
rt
)
{
struct
flowi
fl
=
{
.
fl4_dst
=
rt
->
rt_key_dst
,
.
fl4_src
=
rt
->
rt_key_src
,
.
fl4_tos
=
rt
->
rt_tos
,
.
flowi_oif
=
rt
->
rt_oif
,
.
flowi_iif
=
rt
->
rt_iif
,
.
flowi_mark
=
rt
->
rt_mark
,
struct
flowi
4
fl4
=
{
.
daddr
=
rt
->
rt_key_dst
,
.
saddr
=
rt
->
rt_key_src
,
.
fl
owi
4_tos
=
rt
->
rt_tos
,
.
flowi
4
_oif
=
rt
->
rt_oif
,
.
flowi
4
_iif
=
rt
->
rt_iif
,
.
flowi
4
_mark
=
rt
->
rt_mark
,
};
struct
mr_table
*
mrt
;
int
err
;
err
=
ipmr_fib_lookup
(
net
,
&
fl
,
&
mrt
);
err
=
ipmr_fib_lookup
(
net
,
&
fl
4
,
&
mrt
);
if
(
err
)
return
ERR_PTR
(
err
);
return
mrt
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment