diff options
author | 2015-08-02 23:29:27 +0000 | |
---|---|---|
committer | 2015-08-02 23:29:27 +0000 | |
commit | 7ffc22eeb4e14980c1065538f5987df50507019b (patch) | |
tree | d4ecca98221d68046e0e0dd08aaf67d6687fb26f | |
parent | Fire pending events when the module starts. (diff) | |
download | wireguard-openbsd-7ffc22eeb4e14980c1065538f5987df50507019b.tar.xz wireguard-openbsd-7ffc22eeb4e14980c1065538f5987df50507019b.zip |
Check the received packet length properly.
-rw-r--r-- | usr.sbin/radiusd/radiusd_module.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/radiusd/radiusd_module.c b/usr.sbin/radiusd/radiusd_module.c index 77cda7b7fc2..03b161661c7 100644 --- a/usr.sbin/radiusd/radiusd_module.c +++ b/usr.sbin/radiusd/radiusd_module.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radiusd_module.c,v 1.3 2015/08/02 21:30:34 yasuoka Exp $ */ +/* $OpenBSD: radiusd_module.c,v 1.4 2015/08/02 23:29:27 yasuoka Exp $ */ /* * Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net> @@ -450,7 +450,7 @@ module_imsg_handler(struct module_base *base, struct imsg *imsg) base->radpktoff += chunklen; if (!accessreq->final) goto accsreq_out; - if (base->radpktoff != base->radpktsiz) { + if (base->radpktoff != accessreq->datalen) { syslog(LOG_ERR, "Could not handle received ACCSREQ " "message: length is mismatch"); |