Changeset 271:411314907b43 in freeDiameter for extensions/app_radgw/rgw_worker.c
- Timestamp:
- Apr 20, 2010, 7:34:59 PM (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/app_radgw/rgw_worker.c
r258 r271 248 248 /* Pass the Diameter answer to the same extensions as the request */ 249 249 CHECK_FCT_DO( rgw_plg_loop_ans(pa->rad, pa->sess, ans, &rad_ans, pa->cli), goto out ); 250 251 /* Now check what AVPs remain in the diameter answer. If AVPs with the 'M' flag are here, we have a problem... */ 252 CHECK_FCT_DO( fd_msg_browse(*ans, MSG_BRW_FIRST_CHILD, &avp, NULL), { avp = NULL; pb++; } ); 253 while (avp) { 254 CHECK_FCT_DO( fd_msg_avp_hdr ( avp, &ahdr ), { pb++; continue; } ); 255 if (ahdr->avp_flags & AVP_FLAG_MANDATORY) { 256 if (ahdr->avp_flags & AVP_FLAG_VENDOR) { 257 TRACE_DEBUG(FULL, "Remaining Mandatory Vendor AVP, code %d", ahdr->avp_code); 258 pb++; 259 } else { 260 switch (ahdr->avp_code) { 261 /* A few AVPs can be safely ignored here: */ 262 case DIAM_ATTR_ROUTE_RECORD: 263 case DIAM_ATTR_PROXY_INFO: 264 265 266 /* just ignore */ 267 break; 268 269 default: 270 TRACE_DEBUG(FULL, "Remaining Mandatory AVP, code %d", ahdr->avp_code); 271 pb++; 250 251 if (*ans != NULL) { 252 253 /* Now check what AVPs remain in the diameter answer. If AVPs with the 'M' flag are here, we have a problem... */ 254 CHECK_FCT_DO( fd_msg_browse(*ans, MSG_BRW_FIRST_CHILD, &avp, NULL), { avp = NULL; pb++; } ); 255 while (avp) { 256 CHECK_FCT_DO( fd_msg_avp_hdr ( avp, &ahdr ), { pb++; continue; } ); 257 if (ahdr->avp_flags & AVP_FLAG_MANDATORY) { 258 if (ahdr->avp_flags & AVP_FLAG_VENDOR) { 259 TRACE_DEBUG(FULL, "Remaining Mandatory Vendor AVP, code %d", ahdr->avp_code); 260 pb++; 261 } else { 262 switch (ahdr->avp_code) { 263 /* A few AVPs can be safely ignored here: */ 264 case DIAM_ATTR_ROUTE_RECORD: 265 case DIAM_ATTR_PROXY_INFO: 266 267 268 /* just ignore */ 269 break; 270 271 default: 272 TRACE_DEBUG(FULL, "Remaining Mandatory AVP, code %d", ahdr->avp_code); 273 pb++; 274 } 272 275 } 273 276 } 274 }275 CHECK_FCT_DO( fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL), { pb++; break; } );276 } 277 278 if (pb) {279 TRACE_DEBUG(INFO, "[radgw] WARNING: %d mandatory AVP in the Diameter answer have not been translated to RADIUS!\n Please use plg_debug.rgwx for more information.", pb);277 CHECK_FCT_DO( fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL), { pb++; break; } ); 278 } 279 280 if (pb) { 281 TRACE_DEBUG(INFO, "[radgw] WARNING: %d mandatory AVP in the Diameter answer have not been translated to RADIUS!\n Please use plg_debug.rgwx for more information.", pb); 282 } 280 283 } 281 284
Note: See TracChangeset
for help on using the changeset viewer.