diff mbox

Do not send a NAS-Port attribute in Access-Request and Accounting-Request RADIUS packets as the association id is likely to always be 0.

Message ID CAGnO3drSKsbBv+kMso=EFYJ7t+QEBOCttC-jjuA53EWES=6qRQ@mail.gmail.com
State Accepted
Headers show

Commit Message

Nick Lowe Aug. 8, 2016, 1:28 p.m. UTC
[PATCH] Do not include a NAS-Port attribute in Access-Request and
 Accounting-Request packets where the Association ID (AID) is 0.

Signed-off-by: Nick Lowe <nick.lowe@lugatech.com>
---
 src/ap/ieee802_1x.c | 1 +
 1 file changed, 1 insertion(+)

  return -1;

Comments

Jouni Malinen Aug. 13, 2016, 9:25 p.m. UTC | #1
On Mon, Aug 08, 2016 at 02:28:23PM +0100, Nick Lowe wrote:
> [PATCH] Do not include a NAS-Port attribute in Access-Request and
>  Accounting-Request packets where the Association ID (AID) is 0.

Thanks, applied.
diff mbox

Patch

diff --git a/src/ap/ieee802_1x.c b/src/ap/ieee802_1x.c
index 42b0299..80ff996 100644
--- a/src/ap/ieee802_1x.c
+++ b/src/ap/ieee802_1x.c
@@ -414,6 +414,7 @@  static int add_common_radius_sta_attr(struct
hostapd_data *hapd,

  if (!hostapd_config_get_radius_attr(req_attr,
     RADIUS_ATTR_NAS_PORT) &&
+    sta->aid > 0 &&
     !radius_msg_add_attr_int32(msg, RADIUS_ATTR_NAS_PORT, sta->aid)) {
  wpa_printf(MSG_ERROR, "Could not add NAS-Port");