Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gsplhtlxg
clone-Linux
提交
da91981b
C
clone-Linux
项目概览
gsplhtlxg
/
clone-Linux
通知
2
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
clone-Linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
da91981b
编写于
3月 12, 2011
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ipv4: Use flowi4 in ipmr code.
Signed-off-by:
N
David S. Miller
<
davem@davemloft.net
>
上级
9ade2286
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
16 deletion
+17
-16
net/ipv4/ipmr.c
net/ipv4/ipmr.c
+17
-16
未找到文件。
net/ipv4/ipmr.c
浏览文件 @
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
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录