Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
d7aabf22
cloud-kernel
项目概览
openanolis
/
cloud-kernel
12 个月 前同步成功
通知
152
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d7aabf22
编写于
4月 10, 2008
作者:
Y
YOSHIFUJI Hideaki
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[IPV6]: Use in6addr_any where appropriate.
Signed-off-by:
N
YOSHIFUJI Hideaki
<
yoshfuji@linux-ipv6.org
>
上级
f3ee4010
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
12 addition
and
11 deletion
+12
-11
net/ipv6/addrconf.c
net/ipv6/addrconf.c
+1
-3
net/ipv6/mcast.c
net/ipv6/mcast.c
+11
-8
未找到文件。
net/ipv6/addrconf.c
浏览文件 @
d7aabf22
...
...
@@ -2745,7 +2745,6 @@ static void addrconf_dad_timer(unsigned long data)
{
struct
inet6_ifaddr
*
ifp
=
(
struct
inet6_ifaddr
*
)
data
;
struct
inet6_dev
*
idev
=
ifp
->
idev
;
struct
in6_addr
unspec
;
struct
in6_addr
mcaddr
;
read_lock_bh
(
&
idev
->
lock
);
...
...
@@ -2774,9 +2773,8 @@ static void addrconf_dad_timer(unsigned long data)
read_unlock_bh
(
&
idev
->
lock
);
/* send a neighbour solicitation for our addr */
memset
(
&
unspec
,
0
,
sizeof
(
unspec
));
addrconf_addr_solict_mult
(
&
ifp
->
addr
,
&
mcaddr
);
ndisc_send_ns
(
ifp
->
idev
->
dev
,
NULL
,
&
ifp
->
addr
,
&
mcaddr
,
&
unspec
);
ndisc_send_ns
(
ifp
->
idev
->
dev
,
NULL
,
&
ifp
->
addr
,
&
mcaddr
,
&
in6addr_any
);
out:
in6_ifa_put
(
ifp
);
}
...
...
net/ipv6/mcast.c
浏览文件 @
d7aabf22
...
...
@@ -1404,6 +1404,7 @@ static struct sk_buff *mld_newpack(struct net_device *dev, int size)
struct
sk_buff
*
skb
;
struct
mld2_report
*
pmr
;
struct
in6_addr
addr_buf
;
const
struct
in6_addr
*
saddr
;
int
err
;
u8
ra
[
8
]
=
{
IPPROTO_ICMPV6
,
0
,
IPV6_TLV_ROUTERALERT
,
2
,
0
,
0
,
...
...
@@ -1422,10 +1423,11 @@ static struct sk_buff *mld_newpack(struct net_device *dev, int size)
* use unspecified address as the source address
* when a valid link-local address is not available.
*/
memset
(
&
addr_buf
,
0
,
sizeof
(
addr_buf
));
}
saddr
=
&
in6addr_any
;
}
else
saddr
=
&
addr_buf
;
ip6_nd_hdr
(
sk
,
skb
,
dev
,
&
addr_buf
,
&
mld2_all_mcr
,
NEXTHDR_HOP
,
0
);
ip6_nd_hdr
(
sk
,
skb
,
dev
,
saddr
,
&
mld2_all_mcr
,
NEXTHDR_HOP
,
0
);
memcpy
(
skb_put
(
skb
,
sizeof
(
ra
)),
ra
,
sizeof
(
ra
));
...
...
@@ -1766,7 +1768,7 @@ static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type)
struct
inet6_dev
*
idev
;
struct
sk_buff
*
skb
;
struct
icmp6hdr
*
hdr
;
const
struct
in6_addr
*
snd_addr
;
const
struct
in6_addr
*
snd_addr
,
*
saddr
;
struct
in6_addr
*
addrp
;
struct
in6_addr
addr_buf
;
int
err
,
len
,
payload_len
,
full_len
;
...
...
@@ -1805,10 +1807,11 @@ static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type)
* use unspecified address as the source address
* when a valid link-local address is not available.
*/
memset
(
&
addr_buf
,
0
,
sizeof
(
addr_buf
));
}
saddr
=
&
in6addr_any
;
}
else
saddr
=
&
addr_buf
;
ip6_nd_hdr
(
sk
,
skb
,
dev
,
&
addr_buf
,
snd_addr
,
NEXTHDR_HOP
,
payload_len
);
ip6_nd_hdr
(
sk
,
skb
,
dev
,
saddr
,
snd_addr
,
NEXTHDR_HOP
,
payload_len
);
memcpy
(
skb_put
(
skb
,
sizeof
(
ra
)),
ra
,
sizeof
(
ra
));
...
...
@@ -1819,7 +1822,7 @@ static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type)
addrp
=
(
struct
in6_addr
*
)
skb_put
(
skb
,
sizeof
(
struct
in6_addr
));
ipv6_addr_copy
(
addrp
,
addr
);
hdr
->
icmp6_cksum
=
csum_ipv6_magic
(
&
addr_buf
,
snd_addr
,
len
,
hdr
->
icmp6_cksum
=
csum_ipv6_magic
(
saddr
,
snd_addr
,
len
,
IPPROTO_ICMPV6
,
csum_partial
((
__u8
*
)
hdr
,
len
,
0
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录