Changeset 395:8e26b203e3cb in freeDiameter
- Timestamp:
- Jul 7, 2010, 5:53:18 PM (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/app_radgw/rgw_clients.c
r278 r395 81 81 uint16_t port; 82 82 uint8_t id; 83 uint8_t auth[16]; /* we also compare the request authenticator to avoid buggy NASes */ 83 84 struct radius_msg * ans; /* to be able to resend a lost answer */ 84 85 } last[2]; /*[0] for auth, [1] for acct. */ … … 251 252 idx = 1; 252 253 253 if ((cli->last[idx].id == (*msg)->radius.hdr->identifier) && (cli->last[idx].port == (*msg)->port)) { 254 if ((cli->last[idx].id == (*msg)->radius.hdr->identifier) 255 && (cli->last[idx].port == (*msg)->port) 256 && !memcmp(&cli->last[idx].auth[0], &(*msg)->radius.hdr->authenticator[0], 16)) { 254 257 /* Duplicate! */ 255 258 TRACE_DEBUG(INFO, "Received duplicated RADIUS message (id: %02hhx, port: %hu).", (*msg)->radius.hdr->identifier, ntohs((*msg)->port)); … … 266 269 cli->last[idx].id = (*msg)->radius.hdr->identifier; 267 270 cli->last[idx].port = (*msg)->port; 271 memcpy(&cli->last[idx].auth[0], &(*msg)->radius.hdr->authenticator[0], 16); 268 272 } else { 269 273 /* We have got previous message(s), update the info only if answered already */ … … 271 275 cli->last[idx].id = (*msg)->radius.hdr->identifier; 272 276 cli->last[idx].port = (*msg)->port; 277 memcpy(&cli->last[idx].auth[0], &(*msg)->radius.hdr->authenticator[0], 16); 273 278 /* Free the previous answer */ 274 279 radius_msg_free(cli->last[idx].ans);
Note: See TracChangeset
for help on using the changeset viewer.