CISCO_ACCOUNTING_HACK

Gabriel Blanchard gabe at teksavvy.ca
Mon Aug 17 18:53:58 CEST 2009


in rlm_sql.c

this portion of code is causing problems combined with the  
"buffered_sql/detail" server.

I don't actually use Ciscos but Juniper ERXes and this still happens.

nevertheless by returning RLM_MODULE_NOOP it causes the buffered sql  
home server to try to send the packet for ever resulting in the detail  
file never being processed.

I'm not sure what would be appropriate fix here, the only way to  
disable this section is to go in src/modules/rlm_sql/conf.h and remove  
the define manually. Maybe a configure script option would be nice.

Or maybe returning RLM_MODULE_OK, but in a sense it wouldn't be true  
since the module did in fact do nothing.

#ifdef CISCO_ACCOUNTING_HACK
					        /*
					         * If stop but zero session length AND no previous
					         * session found, drop it as in invalid packet
				        	 * This is to fix CISCO's aaa from filling our
				        	 * table with bogus crap
					         */
					        if ((pair = pairfind(request->packet->vps,  
PW_ACCT_SESSION_TIME)) != NULL)
					                acctsessiontime = pair->vp_integer;

						if (acctsessiontime <= 0) {
							radius_xlat(logstr, sizeof(logstr), "stop packet with zero  
session length. [user '%{User-Name}', nas '%{NAS-IP-Address}']",  
request, NULL);
							radlog_request(L_ERR, 0, request, "%s", logstr);
							sql_release_socket(inst, sqlsocket);
							ret = RLM_MODULE_NOOP;
						}
#endif



More information about the Freeradius-Devel mailing list