Navigation


Changeset 539:6994e9a3c528 in freeDiameter for extensions/app_radgw/radius.c


Ignore:
Timestamp:
Sep 11, 2010, 8:52:36 AM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

The previous commit provoked an Accounting-Response with empty authenticator... Should be fixed now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/app_radgw/radius.c

    r518 r539  
    349349        size_t len[4];
    350350
    351         os_memset(auth, 0, MD5_MAC_LEN);
    352         attr = radius_msg_add_attr(msg, RADIUS_ATTR_MESSAGE_AUTHENTICATOR,
    353                                    auth, MD5_MAC_LEN);
    354         if (attr == NULL) {
    355                 printf("WARNING: Could not add Message-Authenticator\n");
    356                 return -1;
     351        if (msg->hdr->code != RADIUS_CODE_ACCOUNTING_RESPONSE) {
     352            os_memset(auth, 0, MD5_MAC_LEN);
     353            attr = radius_msg_add_attr(msg, RADIUS_ATTR_MESSAGE_AUTHENTICATOR,
     354                                       auth, MD5_MAC_LEN);
     355            if (attr == NULL) {
     356                    printf("WARNING: Could not add Message-Authenticator\n");
     357                    return -1;
     358            }
    357359        }
    358360        msg->hdr->length = htons(msg->buf_used);
Note: See TracChangeset for help on using the changeset viewer.