Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
7d8c6e39
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 3 年多
通知
13
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
7d8c6e39
编写于
6月 12, 2015
作者:
E
Eric W. Biederman
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ipv6: Pass struct net through ip6_fragment
Signed-off-by:
N
Eric W. Biederman
<
ebiederm@xmission.com
>
上级
694869b3
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
21 addition
and
17 deletion
+21
-17
include/linux/netfilter_ipv6.h
include/linux/netfilter_ipv6.h
+2
-2
include/net/ip6_route.h
include/net/ip6_route.h
+2
-2
net/bridge/br_netfilter_hooks.c
net/bridge/br_netfilter_hooks.c
+1
-1
net/ipv6/ip6_output.c
net/ipv6/ip6_output.c
+7
-9
net/ipv6/xfrm6_output.c
net/ipv6/xfrm6_output.c
+8
-2
net/openvswitch/actions.c
net/openvswitch/actions.c
+1
-1
未找到文件。
include/linux/netfilter_ipv6.h
浏览文件 @
7d8c6e39
...
...
@@ -17,8 +17,8 @@ struct nf_ipv6_ops {
int
(
*
chk_addr
)(
struct
net
*
net
,
const
struct
in6_addr
*
addr
,
const
struct
net_device
*
dev
,
int
strict
);
void
(
*
route_input
)(
struct
sk_buff
*
skb
);
int
(
*
fragment
)(
struct
sock
*
sk
,
struct
sk_buff
*
skb
,
int
(
*
output
)(
struct
sock
*
,
struct
sk_buff
*
));
int
(
*
fragment
)(
struct
net
*
net
,
struct
sock
*
sk
,
struct
sk_buff
*
skb
,
int
(
*
output
)(
struct
net
*
,
struct
sock
*
,
struct
sk_buff
*
));
};
#ifdef CONFIG_NETFILTER
...
...
include/net/ip6_route.h
浏览文件 @
7d8c6e39
...
...
@@ -173,8 +173,8 @@ static inline bool ipv6_anycast_destination(const struct dst_entry *dst,
ipv6_addr_equal
(
&
rt
->
rt6i_dst
.
addr
,
daddr
));
}
int
ip6_fragment
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
,
int
(
*
output
)(
struct
sock
*
,
struct
sk_buff
*
));
int
ip6_fragment
(
struct
net
*
net
,
struct
sock
*
sk
,
struct
sk_buff
*
skb
,
int
(
*
output
)(
struct
net
*
,
struct
sock
*
,
struct
sk_buff
*
));
static
inline
int
ip6_skb_dst_mtu
(
struct
sk_buff
*
skb
)
{
...
...
net/bridge/br_netfilter_hooks.c
浏览文件 @
7d8c6e39
...
...
@@ -786,7 +786,7 @@ static int br_nf_dev_queue_xmit(struct net *net, struct sock *sk, struct sk_buff
data
->
size
);
if
(
v6ops
)
return
v6ops
->
fragment
(
sk
,
skb
,
br_nf_push_frag_xmit_sk
);
return
v6ops
->
fragment
(
net
,
sk
,
skb
,
br_nf_push_frag_xmit
);
kfree_skb
(
skb
);
return
-
EMSGSIZE
;
...
...
net/ipv6/ip6_output.c
浏览文件 @
7d8c6e39
...
...
@@ -56,11 +56,10 @@
#include <net/checksum.h>
#include <linux/mroute6.h>
static
int
ip6_finish_output2
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
static
int
ip6_finish_output2
(
struct
net
*
net
,
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
{
struct
dst_entry
*
dst
=
skb_dst
(
skb
);
struct
net_device
*
dev
=
dst
->
dev
;
struct
net
*
net
=
dev_net
(
dev
);
struct
neighbour
*
neigh
;
struct
in6_addr
*
nexthop
;
int
ret
;
...
...
@@ -126,9 +125,9 @@ static int ip6_finish_output(struct net *net, struct sock *sk, struct sk_buff *s
if
((
skb
->
len
>
ip6_skb_dst_mtu
(
skb
)
&&
!
skb_is_gso
(
skb
))
||
dst_allfrag
(
skb_dst
(
skb
))
||
(
IP6CB
(
skb
)
->
frag_max_size
&&
skb
->
len
>
IP6CB
(
skb
)
->
frag_max_size
))
return
ip6_fragment
(
sk
,
skb
,
ip6_finish_output2
);
return
ip6_fragment
(
net
,
sk
,
skb
,
ip6_finish_output2
);
else
return
ip6_finish_output2
(
sk
,
skb
);
return
ip6_finish_output2
(
net
,
sk
,
skb
);
}
int
ip6_output
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
...
...
@@ -554,8 +553,8 @@ static void ip6_copy_metadata(struct sk_buff *to, struct sk_buff *from)
skb_copy_secmark
(
to
,
from
);
}
int
ip6_fragment
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
,
int
(
*
output
)(
struct
sock
*
,
struct
sk_buff
*
))
int
ip6_fragment
(
struct
net
*
net
,
struct
sock
*
sk
,
struct
sk_buff
*
skb
,
int
(
*
output
)(
struct
net
*
,
struct
sock
*
,
struct
sk_buff
*
))
{
struct
sk_buff
*
frag
;
struct
rt6_info
*
rt
=
(
struct
rt6_info
*
)
skb_dst
(
skb
);
...
...
@@ -568,7 +567,6 @@ int ip6_fragment(struct sock *sk, struct sk_buff *skb,
__be32
frag_id
;
int
ptr
,
offset
=
0
,
err
=
0
;
u8
*
prevhdr
,
nexthdr
=
0
;
struct
net
*
net
=
dev_net
(
skb_dst
(
skb
)
->
dev
);
hlen
=
ip6_find_1stfragopt
(
skb
,
&
prevhdr
);
nexthdr
=
*
prevhdr
;
...
...
@@ -688,7 +686,7 @@ int ip6_fragment(struct sock *sk, struct sk_buff *skb,
ip6_copy_metadata
(
frag
,
skb
);
}
err
=
output
(
sk
,
skb
);
err
=
output
(
net
,
sk
,
skb
);
if
(
!
err
)
IP6_INC_STATS
(
net
,
ip6_dst_idev
(
&
rt
->
dst
),
IPSTATS_MIB_FRAGCREATES
);
...
...
@@ -816,7 +814,7 @@ int ip6_fragment(struct sock *sk, struct sk_buff *skb,
/*
* Put this fragment into the sending queue.
*/
err
=
output
(
sk
,
frag
);
err
=
output
(
net
,
sk
,
frag
);
if
(
err
)
goto
fail
;
...
...
net/ipv6/xfrm6_output.c
浏览文件 @
7d8c6e39
...
...
@@ -131,6 +131,12 @@ int xfrm6_output_finish(struct sock *sk, struct sk_buff *skb)
return
xfrm_output
(
sk
,
skb
);
}
static
int
__xfrm6_output_finish
(
struct
net
*
net
,
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
{
struct
xfrm_state
*
x
=
skb_dst
(
skb
)
->
xfrm
;
return
x
->
outer_mode
->
afinfo
->
output_finish
(
sk
,
skb
);
}
static
int
__xfrm6_output
(
struct
net
*
net
,
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
{
struct
dst_entry
*
dst
=
skb_dst
(
skb
);
...
...
@@ -160,8 +166,8 @@ static int __xfrm6_output(struct net *net, struct sock *sk, struct sk_buff *skb)
if
(
x
->
props
.
mode
==
XFRM_MODE_TUNNEL
&&
((
skb
->
len
>
mtu
&&
!
skb_is_gso
(
skb
))
||
dst_allfrag
(
skb_dst
(
skb
))))
{
return
ip6_fragment
(
sk
,
skb
,
x
->
outer_mode
->
afinfo
->
output_finish
);
return
ip6_fragment
(
net
,
sk
,
skb
,
__xfrm6_
output_finish
);
}
return
x
->
outer_mode
->
afinfo
->
output_finish
(
sk
,
skb
);
}
...
...
net/openvswitch/actions.c
浏览文件 @
7d8c6e39
...
...
@@ -727,7 +727,7 @@ static void ovs_fragment(struct net *net, struct vport *vport,
skb_dst_set_noref
(
skb
,
&
ovs_rt
.
dst
);
IP6CB
(
skb
)
->
frag_max_size
=
mru
;
v6ops
->
fragment
(
skb
->
sk
,
skb
,
ovs_vport_output_sk
);
v6ops
->
fragment
(
net
,
skb
->
sk
,
skb
,
ovs_vport_output
);
refdst_drop
(
orig_dst
);
}
else
{
WARN_ONCE
(
1
,
"Failed fragment ->%s: eth=%04x, MRU=%d, MTU=%d."
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录