以下测试用例的 Radius 服务器响应代码是什么?

What is Radius Server Response code to the following test cases?

我正在测试我的 Radius 服务器实现,但我不确定以下情况下的正确响应代码:

1-客户端无密码登录 2-客户端发送错误的请求代码 你有什么想法吗?

  1. 根据 RFC 2865 在给定的 Access-Request 中允许 User-Password 的 0-1 个实例,以及 User-Password、Chap-Password 之一或 State 属性必须存在。

An Access-Request MUST contain either a User-Password or a CHAP-Password or State. An Access-Request MUST NOT contain both a User-Password and a CHAP-Password. If future extensions allow other kinds of authentication information to be conveyed, the attribute for that can be used in an Access-Request instead of User-Password or CHAP-Password.

但是,如果这些属性中的 none 存在,RFC 没有说明会发生什么。

如果您希望模拟流行的 RADIUS 解决方案(例如 FreeRADIUS),您应该 return 在这种情况下 Access-Reject。

  1. 这在RFC 2865中处理。

The Code field is one octet, and identifies the type of RADIUS packet. When a packet is received with an invalid Code field, it is silently discarded.

即不应发送任何响应。