Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
bf47f4b0
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
bf47f4b0
编写于
5月 12, 2010
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
git://git.kernel.org/pub/scm/linux/kernel/git/kaber/ipmr-2.6
上级
0b9715e6
5b285cac
变更
7
展开全部
隐藏空白更改
内联
并排
Showing
7 changed file
with
703 addition
and
298 deletion
+703
-298
include/linux/ipv6.h
include/linux/ipv6.h
+1
-0
include/linux/mroute6.h
include/linux/mroute6.h
+12
-23
include/linux/rtnetlink.h
include/linux/rtnetlink.h
+2
-1
include/net/netns/ipv6.h
include/net/netns/ipv6.h
+5
-9
net/ipv6/Kconfig
net/ipv6/Kconfig
+14
-0
net/ipv6/ip6_output.c
net/ipv6/ip6_output.c
+1
-1
net/ipv6/ip6mr.c
net/ipv6/ip6mr.c
+668
-264
未找到文件。
include/linux/ipv6.h
浏览文件 @
bf47f4b0
...
@@ -383,6 +383,7 @@ struct raw6_sock {
...
@@ -383,6 +383,7 @@ struct raw6_sock {
__u32
checksum
;
/* perform checksum */
__u32
checksum
;
/* perform checksum */
__u32
offset
;
/* checksum offset */
__u32
offset
;
/* checksum offset */
struct
icmp6_filter
filter
;
struct
icmp6_filter
filter
;
__u32
ip6mr_table
;
/* ipv6_pinfo has to be the last member of raw6_sock, see inet6_sk_generic */
/* ipv6_pinfo has to be the last member of raw6_sock, see inet6_sk_generic */
struct
ipv6_pinfo
inet6
;
struct
ipv6_pinfo
inet6
;
};
};
...
...
include/linux/mroute6.h
浏览文件 @
bf47f4b0
...
@@ -24,7 +24,8 @@
...
@@ -24,7 +24,8 @@
#define MRT6_DEL_MFC (MRT6_BASE+5)
/* Delete a multicast forwarding entry */
#define MRT6_DEL_MFC (MRT6_BASE+5)
/* Delete a multicast forwarding entry */
#define MRT6_VERSION (MRT6_BASE+6)
/* Get the kernel multicast version */
#define MRT6_VERSION (MRT6_BASE+6)
/* Get the kernel multicast version */
#define MRT6_ASSERT (MRT6_BASE+7)
/* Activate PIM assert mode */
#define MRT6_ASSERT (MRT6_BASE+7)
/* Activate PIM assert mode */
#define MRT6_PIM (MRT6_BASE+8)
/* enable PIM code */
#define MRT6_PIM (MRT6_BASE+8)
/* enable PIM code */
#define MRT6_TABLE (MRT6_BASE+9)
/* Specify mroute table ID */
#define SIOCGETMIFCNT_IN6 SIOCPROTOPRIVATE
/* IP protocol privates */
#define SIOCGETMIFCNT_IN6 SIOCPROTOPRIVATE
/* IP protocol privates */
#define SIOCGETSGCNT_IN6 (SIOCPROTOPRIVATE+1)
#define SIOCGETSGCNT_IN6 (SIOCPROTOPRIVATE+1)
...
@@ -182,10 +183,7 @@ struct mif_device {
...
@@ -182,10 +183,7 @@ struct mif_device {
#define VIFF_STATIC 0x8000
#define VIFF_STATIC 0x8000
struct
mfc6_cache
{
struct
mfc6_cache
{
struct
mfc6_cache
*
next
;
/* Next entry on cache line */
struct
list_head
list
;
#ifdef CONFIG_NET_NS
struct
net
*
mfc6_net
;
#endif
struct
in6_addr
mf6c_mcastgrp
;
/* Group the entry belongs to */
struct
in6_addr
mf6c_mcastgrp
;
/* Group the entry belongs to */
struct
in6_addr
mf6c_origin
;
/* Source of packet */
struct
in6_addr
mf6c_origin
;
/* Source of packet */
mifi_t
mf6c_parent
;
/* Source interface */
mifi_t
mf6c_parent
;
/* Source interface */
...
@@ -208,18 +206,6 @@ struct mfc6_cache {
...
@@ -208,18 +206,6 @@ struct mfc6_cache {
}
mfc_un
;
}
mfc_un
;
};
};
static
inline
struct
net
*
mfc6_net
(
const
struct
mfc6_cache
*
mfc
)
{
return
read_pnet
(
&
mfc
->
mfc6_net
);
}
static
inline
void
mfc6_net_set
(
struct
mfc6_cache
*
mfc
,
struct
net
*
net
)
{
write_pnet
(
&
mfc
->
mfc6_net
,
hold_net
(
net
));
}
#define MFC_STATIC 1
#define MFC_STATIC 1
#define MFC_NOTIFY 2
#define MFC_NOTIFY 2
...
@@ -244,14 +230,17 @@ extern int ip6mr_get_route(struct net *net, struct sk_buff *skb,
...
@@ -244,14 +230,17 @@ extern int ip6mr_get_route(struct net *net, struct sk_buff *skb,
struct
rtmsg
*
rtm
,
int
nowait
);
struct
rtmsg
*
rtm
,
int
nowait
);
#ifdef CONFIG_IPV6_MROUTE
#ifdef CONFIG_IPV6_MROUTE
static
inline
struct
sock
*
mroute6_socket
(
struct
net
*
net
)
extern
struct
sock
*
mroute6_socket
(
struct
net
*
net
,
struct
sk_buff
*
skb
);
{
return
net
->
ipv6
.
mroute6_sk
;
}
extern
int
ip6mr_sk_done
(
struct
sock
*
sk
);
extern
int
ip6mr_sk_done
(
struct
sock
*
sk
);
#else
#else
static
inline
struct
sock
*
mroute6_socket
(
struct
net
*
net
)
{
return
NULL
;
}
static
inline
struct
sock
*
mroute6_socket
(
struct
net
*
net
,
struct
sk_buff
*
skb
)
static
inline
int
ip6mr_sk_done
(
struct
sock
*
sk
)
{
return
0
;
}
{
return
NULL
;
}
static
inline
int
ip6mr_sk_done
(
struct
sock
*
sk
)
{
return
0
;
}
#endif
#endif
#endif
#endif
...
...
include/linux/rtnetlink.h
浏览文件 @
bf47f4b0
...
@@ -11,7 +11,8 @@
...
@@ -11,7 +11,8 @@
* families, values above 128 may be used arbitrarily.
* families, values above 128 may be used arbitrarily.
*/
*/
#define RTNL_FAMILY_IPMR 128
#define RTNL_FAMILY_IPMR 128
#define RTNL_FAMILY_MAX 128
#define RTNL_FAMILY_IP6MR 129
#define RTNL_FAMILY_MAX 129
/****
/****
* Routing/neighbour discovery messages.
* Routing/neighbour discovery messages.
...
...
include/net/netns/ipv6.h
浏览文件 @
bf47f4b0
...
@@ -59,15 +59,11 @@ struct netns_ipv6 {
...
@@ -59,15 +59,11 @@ struct netns_ipv6 {
struct
sock
*
tcp_sk
;
struct
sock
*
tcp_sk
;
struct
sock
*
igmp_sk
;
struct
sock
*
igmp_sk
;
#ifdef CONFIG_IPV6_MROUTE
#ifdef CONFIG_IPV6_MROUTE
struct
sock
*
mroute6_sk
;
#ifndef CONFIG_IPV6_MROUTE_MULTIPLE_TABLES
struct
mfc6_cache
**
mfc6_cache_array
;
struct
mr6_table
*
mrt6
;
struct
mif_device
*
vif6_table
;
#else
int
maxvif
;
struct
list_head
mr6_tables
;
atomic_t
cache_resolve_queue_len
;
struct
fib_rules_ops
*
mr6_rules_ops
;
int
mroute_do_assert
;
int
mroute_do_pim
;
#ifdef CONFIG_IPV6_PIMSM_V2
int
mroute_reg_vif_num
;
#endif
#endif
#endif
#endif
};
};
...
...
net/ipv6/Kconfig
浏览文件 @
bf47f4b0
...
@@ -229,6 +229,20 @@ config IPV6_MROUTE
...
@@ -229,6 +229,20 @@ config IPV6_MROUTE
Experimental support for IPv6 multicast forwarding.
Experimental support for IPv6 multicast forwarding.
If unsure, say N.
If unsure, say N.
config IPV6_MROUTE_MULTIPLE_TABLES
bool "IPv6: multicast policy routing"
depends on IPV6_MROUTE
select FIB_RULES
help
Normally, a multicast router runs a userspace daemon and decides
what to do with a multicast packet based on the source and
destination addresses. If you say Y here, the multicast router
will also be able to take interfaces and packet marks into
account and run multiple instances of userspace daemons
simultaneously, each one handling a single table.
If unsure, say N.
config IPV6_PIMSM_V2
config IPV6_PIMSM_V2
bool "IPv6: PIM-SM version 2 support (EXPERIMENTAL)"
bool "IPv6: PIM-SM version 2 support (EXPERIMENTAL)"
depends on IPV6_MROUTE
depends on IPV6_MROUTE
...
...
net/ipv6/ip6_output.c
浏览文件 @
bf47f4b0
...
@@ -108,7 +108,7 @@ static int ip6_finish_output2(struct sk_buff *skb)
...
@@ -108,7 +108,7 @@ static int ip6_finish_output2(struct sk_buff *skb)
struct
inet6_dev
*
idev
=
ip6_dst_idev
(
skb_dst
(
skb
));
struct
inet6_dev
*
idev
=
ip6_dst_idev
(
skb_dst
(
skb
));
if
(
!
(
dev
->
flags
&
IFF_LOOPBACK
)
&&
sk_mc_loop
(
skb
->
sk
)
&&
if
(
!
(
dev
->
flags
&
IFF_LOOPBACK
)
&&
sk_mc_loop
(
skb
->
sk
)
&&
((
mroute6_socket
(
dev_net
(
dev
))
&&
((
mroute6_socket
(
dev_net
(
dev
)
,
skb
)
&&
!
(
IP6CB
(
skb
)
->
flags
&
IP6SKB_FORWARDED
))
||
!
(
IP6CB
(
skb
)
->
flags
&
IP6SKB_FORWARDED
))
||
ipv6_chk_mcast_addr
(
dev
,
&
ipv6_hdr
(
skb
)
->
daddr
,
ipv6_chk_mcast_addr
(
dev
,
&
ipv6_hdr
(
skb
)
->
daddr
,
&
ipv6_hdr
(
skb
)
->
saddr
)))
{
&
ipv6_hdr
(
skb
)
->
saddr
)))
{
...
...
net/ipv6/ip6mr.c
浏览文件 @
bf47f4b0
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录