From 6ccd711f06e2569469c689f9fb014bfd0b821e05 Mon Sep 17 00:00:00 2001 From: moznion Date: Thu, 4 Feb 2021 00:21:54 +0900 Subject: [PATCH] Comment for special RADIUS code; zero out authenticator Signed-off-by: moznion --- radius/src/core/packet.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/radius/src/core/packet.rs b/radius/src/core/packet.rs index c39a168..5c9a718 100644 --- a/radius/src/core/packet.rs +++ b/radius/src/core/packet.rs @@ -180,7 +180,10 @@ impl Packet { | Code::CoANAK => { let mut buf: Vec = bs[..4].to_vec(); match self.code { - Code::AccountingRequest | Code::DisconnectRequest | Code::CoARequest => { + Code::AccountingRequest // see "Request Authenticator" in https://tools.ietf.org/html/rfc2866#section-3 + | Code::DisconnectRequest // same as "RFC2866"; https://tools.ietf.org/html/rfc5176#section-2.3 + | Code::CoARequest // same as "RFC2866"; https://tools.ietf.org/html/rfc5176#section-2.3 + => { buf.extend(vec![ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,