Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Achou.Wang
accel-ppp
提交
575d140f
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,发现更多精彩内容 >>
提交
575d140f
编写于
11月 30, 2010
作者:
K
Kozlov Dmitry
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ppp: configuration checks
上级
9f69311c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
24 addition
and
4 deletion
+24
-4
accel-pptpd/logs/log_file.c
accel-pptpd/logs/log_file.c
+1
-1
accel-pptpd/ppp/lcp_opt_mru.c
accel-pptpd/ppp/lcp_opt_mru.c
+16
-0
accel-pptpd/ppp/ppp_fsm.c
accel-pptpd/ppp/ppp_fsm.c
+7
-3
未找到文件。
accel-pptpd/logs/log_file.c
浏览文件 @
575d140f
...
...
@@ -203,6 +203,7 @@ static void send_next_chunk(void)
close
(
lf
->
fd
);
lf
->
fd
=
lf
->
new_fd
;
lf
->
new_fd
=
-
1
;
lf
->
offset
=
0
;
}
aiocb
.
aio_fildes
=
lf
->
fd
;
...
...
@@ -335,7 +336,6 @@ static void general_reopen(void)
return
;
}
log_file
->
new_fd
=
fd
;
log_file
->
offset
=
0
;
}
static
void
free_lpd
(
struct
log_file_pd_t
*
lpd
)
...
...
accel-pptpd/ppp/lcp_opt_mru.c
浏览文件 @
575d140f
...
...
@@ -2,6 +2,7 @@
#include <string.h>
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <sys/ioctl.h>
...
...
@@ -167,6 +168,21 @@ static void __init mru_opt_init()
opt
=
conf_get_opt
(
"ppp"
,
"max-mtu"
);
if
(
opt
&&
atoi
(
opt
)
>
0
)
conf_max_mtu
=
atoi
(
opt
);
if
(
conf_min_mtu
>
conf_mru
)
{
log_emerg
(
"min-mtu cann't be greater then mtu/mru
\n
"
);
_exit
(
-
1
);
}
if
(
conf_min_mtu
>
1500
)
{
log_emerg
(
"min-mtu cann't be greater then 1500
\n
"
);
_exit
(
-
1
);
}
if
(
conf_mru
>
1500
||
conf_mtu
>
1500
)
{
log_emerg
(
"mtu/mru cann't be greater then 1500
\n
"
);
_exit
(
-
1
);
}
lcp_option_register
(
&
mru_opt_hnd
);
}
...
...
accel-pptpd/ppp/ppp_fsm.c
浏览文件 @
575d140f
...
...
@@ -11,8 +11,8 @@
#include "memdebug.h"
static
int
conf_max_terminate
=
2
;
static
int
conf_max_configure
=
5
;
static
int
conf_max_failure
=
5
;
static
int
conf_max_configure
=
10
;
static
int
conf_max_failure
=
10
;
static
int
conf_timeout
=
5
;
void
send_term_req
(
struct
ppp_fsm_t
*
layer
);
...
...
@@ -253,6 +253,10 @@ void ppp_fsm_recv_conf_req_nak(struct ppp_fsm_t *layer)
break
;
case
FSM_Req_Sent
:
case
FSM_Ack_Rcvd
:
if
(
++
layer
->
conf_failure
==
layer
->
max_failure
)
{
if
(
layer
->
layer_finished
)
layer
->
layer_finished
(
layer
);
return
;
}
if
(
layer
->
send_conf_nak
)
layer
->
send_conf_nak
(
layer
);
break
;
case
FSM_Opened
:
...
...
@@ -290,7 +294,7 @@ void ppp_fsm_recv_conf_req_rej(struct ppp_fsm_t *layer)
case
FSM_Req_Sent
:
case
FSM_Ack_Rcvd
:
if
(
++
layer
->
conf_failure
==
layer
->
max_failure
)
{
if
(
layer
->
layer_
down
)
layer
->
layer_down
(
layer
);
if
(
layer
->
layer_
finished
)
layer
->
layer_finished
(
layer
);
return
;
}
if
(
layer
->
send_conf_rej
)
layer
->
send_conf_rej
(
layer
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录