Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Achou.Wang
accel-ppp
提交
b2e53047
A
accel-ppp
项目概览
Achou.Wang
/
accel-ppp
通知
6
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
accel-ppp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
b2e53047
编写于
5月 12, 2016
作者:
V
Vladislav Grishenko
提交者:
Dmitry Kozlov
12月 05, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ipv6: nd: add AdvOnLinkFlag option support
上级
b1059733
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
2 deletion
+10
-2
accel-pppd/ipdb.h
accel-pppd/ipdb.h
+1
-0
accel-pppd/ipv6/nd.c
accel-pppd/ipv6/nd.c
+9
-2
未找到文件。
accel-pppd/ipdb.h
浏览文件 @
b2e53047
...
...
@@ -17,6 +17,7 @@ struct ipv6db_addr_t
struct
list_head
entry
;
struct
in6_addr
addr
;
int
prefix_len
;
int
flag_onlink
:
1
;
int
flag_auto
:
1
;
int
installed
:
1
;
};
...
...
accel-pppd/ipv6/nd.c
浏览文件 @
b2e53047
...
...
@@ -42,6 +42,7 @@ static int conf_AdvCurHopLimit = 64;
static
int
conf_AdvDefaultLifetime
;
static
int
conf_AdvPrefixValidLifetime
=
2592000
;
static
int
conf_AdvPrefixPreferredLifetime
=
604800
;
static
int
conf_AdvPrefixOnLinkFlag
;
static
int
conf_AdvPrefixAutonomousFlag
;
...
...
@@ -132,8 +133,9 @@ static void ipv6_nd_send_ra(struct ipv6_nd_handler_t *h, struct sockaddr_in6 *ad
pinfo
->
nd_opt_pi_type
=
ND_OPT_PREFIX_INFORMATION
;
pinfo
->
nd_opt_pi_len
=
4
;
pinfo
->
nd_opt_pi_prefix_len
=
a
->
prefix_len
;
pinfo
->
nd_opt_pi_flags_reserved
=
ND_OPT_PI_FLAG_ONLINK
|
(
a
->
flag_auto
||
(
conf_AdvPrefixAutonomousFlag
&&
a
->
prefix_len
==
64
))
?
ND_OPT_PI_FLAG_AUTO
:
0
;
pinfo
->
nd_opt_pi_flags_reserved
=
((
a
->
flag_onlink
||
conf_AdvPrefixOnLinkFlag
)
?
ND_OPT_PI_FLAG_ONLINK
:
0
)
|
((
a
->
flag_auto
||
(
conf_AdvPrefixAutonomousFlag
&&
a
->
prefix_len
==
64
))
?
ND_OPT_PI_FLAG_AUTO
:
0
);
pinfo
->
nd_opt_pi_valid_time
=
htonl
(
conf_AdvPrefixValidLifetime
);
pinfo
->
nd_opt_pi_preferred_time
=
htonl
(
conf_AdvPrefixPreferredLifetime
);
memcpy
(
&
pinfo
->
nd_opt_pi_prefix
,
&
a
->
addr
,
8
);
...
...
@@ -488,6 +490,7 @@ static void load_config(void)
conf_AdvManagedFlag
=
triton_module_loaded
(
"ipv6_dhcp"
);
conf_AdvOtherConfigFlag
=
triton_module_loaded
(
"ipv6_dhcp"
);
conf_AdvPrefixOnLinkFlag
=
1
;
conf_AdvPrefixAutonomousFlag
=
!
conf_AdvManagedFlag
;
conf_rdnss_lifetime
=
conf_MaxRtrAdvInterval
;
...
...
@@ -538,6 +541,10 @@ static void load_config(void)
if
(
opt
)
conf_AdvPrefixPreferredLifetime
=
atoi
(
opt
);
opt
=
conf_get_opt
(
"ipv6-nd"
,
"AdvOnLinkFlag"
);
if
(
opt
)
conf_AdvPrefixOnLinkFlag
=
atoi
(
opt
);
opt
=
conf_get_opt
(
"ipv6-nd"
,
"AdvAutonomousFlag"
);
if
(
opt
)
conf_AdvPrefixAutonomousFlag
=
atoi
(
opt
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录