Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Achou.Wang
accel-ppp
提交
37c752f4
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 搜索 >>
提交
37c752f4
编写于
4月 22, 2013
作者:
D
Dmitry Kozlov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ipoe: use interface's ifindex as Nas-Port
上级
7941c081
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
4 deletion
+10
-4
accel-pppd/ctrl/ipoe/ipoe.c
accel-pppd/ctrl/ipoe/ipoe.c
+3
-0
accel-pppd/radius/req.c
accel-pppd/radius/req.c
+7
-4
未找到文件。
accel-pppd/ctrl/ipoe/ipoe.c
浏览文件 @
37c752f4
...
...
@@ -341,6 +341,8 @@ static void ipoe_session_start(struct ipoe_session *ses)
return
;
}
}
ses
->
ses
.
unit_idx
=
ses
->
serv
->
ifindex
;
triton_event_fire
(
EV_CTRL_STARTING
,
&
ses
->
ses
);
triton_event_fire
(
EV_CTRL_STARTED
,
&
ses
->
ses
);
...
...
@@ -407,6 +409,7 @@ static void ipoe_session_start(struct ipoe_session *ses)
strncpy
(
ses
->
ses
.
ifname
,
ifr
.
ifr_name
,
AP_IFNAME_LEN
);
ses
->
ses
.
ifindex
=
ses
->
ifindex
;
ses
->
ses
.
unit_idx
=
ses
->
ifindex
;
}
ap_session_set_ifindex
(
&
ses
->
ses
);
...
...
accel-pppd/radius/req.c
浏览文件 @
37c752f4
...
...
@@ -66,16 +66,17 @@ static struct rad_req_t *__rad_req_alloc(struct radius_pd_t *rpd, int code, cons
if
(
rad_packet_add_str
(
req
->
pack
,
NULL
,
"User-Name"
,
username
))
goto
out_err
;
if
(
conf_nas_identifier
)
if
(
rad_packet_add_str
(
req
->
pack
,
NULL
,
"NAS-Identifier"
,
conf_nas_identifier
))
goto
out_err
;
if
(
conf_nas_ip_address
)
if
(
rad_packet_add_ipaddr
(
req
->
pack
,
NULL
,
"NAS-IP-Address"
,
conf_nas_ip_address
))
goto
out_err
;
if
(
ppp
)
{
if
(
rad_packet_add_int
(
req
->
pack
,
NULL
,
"NAS-Port"
,
ppp
->
ses
.
unit_idx
))
goto
out_err
;
}
if
(
rad_packet_add_int
(
req
->
pack
,
NULL
,
"NAS-Port"
,
rpd
->
ses
->
unit_idx
))
goto
out_err
;
if
(
req
->
rpd
->
ses
->
ctrl
->
type
==
CTRL_TYPE_IPOE
)
{
if
(
rad_packet_add_val
(
req
->
pack
,
NULL
,
"NAS-Port-Type"
,
"Ethernet"
))
...
...
@@ -94,9 +95,11 @@ static struct rad_req_t *__rad_req_alloc(struct radius_pd_t *rpd, int code, cons
if
(
rpd
->
ses
->
ctrl
->
calling_station_id
)
if
(
rad_packet_add_str
(
req
->
pack
,
NULL
,
"Calling-Station-Id"
,
rpd
->
ses
->
ctrl
->
calling_station_id
))
goto
out_err
;
if
(
rpd
->
ses
->
ctrl
->
called_station_id
)
if
(
rad_packet_add_str
(
req
->
pack
,
NULL
,
"Called-Station-Id"
,
rpd
->
ses
->
ctrl
->
called_station_id
))
goto
out_err
;
if
(
rpd
->
attr_class
)
if
(
rad_packet_add_octets
(
req
->
pack
,
NULL
,
"Class"
,
rpd
->
attr_class
,
rpd
->
attr_class_len
))
goto
out_err
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录