我已经创建了python模块。当尝试使用radtest进行测试时,回答如下:
User-Password = "testing123"
NAS-IP-Address = 127.0.1.1
NAS-Port = 0
Message-Authenticator = 0x00
Cleartext-Password = "testing123"
Received Access-Accept Id 188 from 127.0.0.1:1812 to 0.0.0.0:0 length 48
ERX-Service-Activate:0 = "srs-local-ipoe"如您所见,只有一个零标记属性。
但是radiusd -X向我展示了另一个输出:
authorize - 'reply:ERX-Service-Activate:1' = 'srs-local-ipoe'
authorize - 'reply:ERX-Service-Activate:2' = 'srs-localnet-ipoe(110000)'
authorize - 'reply:ERX-Service-Activate:3' = 'srs-foreignnet-ipoe(110000,110000)'
authorize - 'config:Auth-Type' = 'Accept'
authorize - 'config:Cleartext-Password' = 'testing123'如何获取所有ERX-服务-激活标记属性。
Python构造答复:
reply = (('Framed-IP-Address', str(client.ipv4)),
('ERX-Service-Activate:1', 'srs-local-ipoe'),
('ERX-Service-Activate:2',
'srs-localnet-ipoe(%s)' % str(client.s_localnet)),
('ERX-Service-Activate:3',
'srs-foreign-ipoe(%s,%s)' % (str(client.s_foreign),
str(client.s_localnet))),)Wireshark中的回复只有一个ERX-服务-激活属性。
发布于 2018-02-26 07:11:33
修正自由式版本3.0.17的问题
另外,还应该修改一下答复:
回复=(‘框架-IP-地址’,str(client.ipv4)),(‘ERX-服务-激活:1’,‘srs-本地-ipoe’),(‘ERX-服务-激活:2’,'+=','srs-localnet-ipoe(%s)‘%local(%client.s_localnet)’% str(client.s_localnet)),(‘ERX-服务-激活:3’,‘+=’‘,(%S,%s)‘% (str(client.s_foreign),str(client.s_localnet))
https://serverfault.com/questions/898539
复制相似问题