public void onAcctStopped(SessionExpiredEvent event) { RadiusLog.debug("Completed Session Expired: " + event); } }
public void putAppBuffer(byte []b, int off, int len) { try { appOutput.write(b, off, len); } catch (Exception e) { RadiusLog.error(e.getMessage(), e); } }
public void commitLogEntry(JRadiusLogEntry entry, int result) { String mesg = entry.toString(); if (mesg != null) RadiusLog.info(mesg); }
private void setPacketHandlersForProcessor(ListenerConfigurationItem cfg, Processor processor) { List<JRCommand> requestHandlers = cfg.getRequestHandlers(); if (requestHandlers == null) { RadiusLog.debug("No packet handlers are configured, maybe using chains instead."); return; } for (JRCommand handler : requestHandlers) { RadiusLog.info("Packet handler " + handler.getClass().getName()); } processor.setRequestHandlers(requestHandlers); }
protected void logReturnCode(int result, JRCommand handler) { switch (result) { case JRadiusServer.RLM_MODULE_INVALID: case JRadiusServer.RLM_MODULE_NOTFOUND: case JRadiusServer.RLM_MODULE_FAIL: RadiusLog.error("Error: Packet handler returned " + JRadiusServer.resultCodeToString(result) + ". Stopped handling this packet."); break; case JRadiusServer.RLM_MODULE_HANDLED: case JRadiusServer.RLM_MODULE_REJECT: RadiusLog.info("Packet handler returned " + JRadiusServer.resultCodeToString(result) + ". Stopped handling this packet."); break; case JRadiusServer.RLM_MODULE_OK: case JRadiusServer.RLM_MODULE_NOOP: case JRadiusServer.RLM_MODULE_UPDATED: case JRadiusServer.RLM_MODULE_NUMCODES: case JRadiusServer.RLM_MODULE_USERLOCK: default: RadiusLog.debug("Packet handler " + handler.getName() + " returned " + JRadiusServer.resultCodeToString(result) + ". Continue handling this packet."); break; } } }
if (logConfig != null) RadiusLog.warn("A RadiusLogger is already configured, skipping configuration"); return; RadiusLog.setRadiusLogger(logger); RadiusLog.debug("Configuring RadiusLogger " + logConfig.getName() + ": " + logger.getClass().getName()); RadiusLog.error(e.getMessage(), e); logConfig = null;
private static RadiusAttribute attr(long type) throws InstantiationException, IllegalAccessException { RadiusAttribute attr = null; Class<?> c = attributeMap.get(new Long(type)); if (c != null) { attr = (RadiusAttribute) c.newInstance(); } else { RadiusLog.warn("Unknown Attribute: " + type); attr = new Attr_UnknownAttribute(type); } return attr; }
protected int handleRadiusException(JRadiusRequest request, RadiusException e) { JRadiusSession session = request.getSession(); String error = e.getMessage(); RadiusLog.warn(error); if (session != null) { try { session.getLogEntry(request).addMessage(error); } catch (RadiusException re) { RadiusLog.problem(request, session, re, re.getMessage()); } // lets not remove the session and let it expire, or maybe // this was a RADIUS retransmission that should simply be forgotten //session.setSessionState(JRadiusSession.RADIUS_ERROR); //sessionManager.removeSession(session); } return (e instanceof RadiusSecurityException) ? JRadiusServer.RLM_MODULE_REJECT : JRadiusServer.RLM_MODULE_FAIL; }
public void onAuthPending(SessionExpiredEvent event) { RadiusLog.problem(null, event.getSession(), null, "Expired in Auth-Pending state (no response from service provider)"); }
protected void logReturnCode(int result, JRCommand handler) { switch (result) { case JRadiusServer.RLM_MODULE_INVALID: case JRadiusServer.RLM_MODULE_NOTFOUND: case JRadiusServer.RLM_MODULE_FAIL: RadiusLog.error("Error: Packet handler returned " + JRadiusServer.resultCodeToString(result) + ". Stopped handling this packet."); break; case JRadiusServer.RLM_MODULE_HANDLED: case JRadiusServer.RLM_MODULE_REJECT: RadiusLog.info("Packet handler returned " + JRadiusServer.resultCodeToString(result) + ". Stopped handling this packet."); break; case JRadiusServer.RLM_MODULE_OK: case JRadiusServer.RLM_MODULE_NOOP: case JRadiusServer.RLM_MODULE_UPDATED: case JRadiusServer.RLM_MODULE_NUMCODES: case JRadiusServer.RLM_MODULE_USERLOCK: default: RadiusLog.debug("Packet handler " + handler.getName() + " returned " + JRadiusServer.resultCodeToString(result) + ". Continue handling this packet."); } } }
if (logConfig != null) RadiusLog.warn("A RadiusLogger is already configured, skipping configuration"); return; RadiusLog.setRadiusLogger(logger); RadiusLog.debug("Configuring RadiusLogger " + logConfig.getName() + ": " + logger.getClass().getName()); RadiusLog.error(e.getMessage(), e); logConfig = null;
private static RadiusAttribute attr(long type) throws InstantiationException, IllegalAccessException { RadiusAttribute attr = null; Class<?> c = attributeMap.get(new Long(type)); if (c != null) { attr = (RadiusAttribute) c.newInstance(); } else { RadiusLog.warn("Unknown Attribute: " + type); attr = new Attr_UnknownAttribute(type); } return attr; }
private void setPacketHandlersForProcessor(ListenerConfigurationItem cfg, Processor processor) { List<JRCommand> requestHandlers = cfg.getRequestHandlers(); if (requestHandlers == null) { RadiusLog.debug("No packet handlers are configured, maybe using chains instead."); return; } for (JRCommand handler : requestHandlers) { RadiusLog.info("Packet handler " + handler.getClass().getName()); } processor.setRequestHandlers(requestHandlers); }
protected int handleRadiusException(JRadiusRequest request, RadiusException e) { JRadiusSession session = request.getSession(); String error = e.getMessage(); RadiusLog.warn(error); if (session != null) { try { session.getLogEntry(request).addMessage(error); } catch (RadiusException re) { RadiusLog.problem(request, session, re, re.getMessage()); } // lets not remove the session and let it expire, or maybe // this was a RADIUS retransmission that should simply be forgotten //session.setSessionState(JRadiusSession.RADIUS_ERROR); //sessionManager.removeSession(session); } return (e instanceof RadiusSecurityException) ? JRadiusServer.RLM_MODULE_REJECT : JRadiusServer.RLM_MODULE_FAIL; }
public void onAuthPending(SessionExpiredEvent event) { RadiusLog.problem(null, event.getSession(), null, "Expired in Auth-Pending state (no response from service provider)"); }
protected void logReturnCode(int result, JRCommand handler) { switch (result) { case JRadiusServer.RLM_MODULE_INVALID: case JRadiusServer.RLM_MODULE_NOTFOUND: case JRadiusServer.RLM_MODULE_FAIL: RadiusLog.error("Error: Packet handler returned " + JRadiusServer.resultCodeToString(result) + ". Stopped handling this packet."); break; case JRadiusServer.RLM_MODULE_HANDLED: case JRadiusServer.RLM_MODULE_REJECT: RadiusLog.info("Packet handler returned " + JRadiusServer.resultCodeToString(result) + ". Stopped handling this packet."); break; case JRadiusServer.RLM_MODULE_OK: case JRadiusServer.RLM_MODULE_NOOP: case JRadiusServer.RLM_MODULE_UPDATED: case JRadiusServer.RLM_MODULE_NUMCODES: case JRadiusServer.RLM_MODULE_USERLOCK: default: RadiusLog.debug("Packet handler " + handler.getName() + " returned " + JRadiusServer.resultCodeToString(result) + ". Continue handling this packet."); break; } } }
public void putAppBuffer(byte []b, int off, int len) { try { appOutput.write(b, off, len); } catch (Exception e) { RadiusLog.error(e.getMessage(), e); } }
public void onAcctStopped(SessionExpiredEvent event) { RadiusLog.debug("Completed Session Expired: " + event); } }
public void commitLogEntry(JRadiusLogEntry entry, int result) { String mesg = entry.toString(); if (mesg != null) RadiusLog.info(mesg); }
private static RadiusAttribute vsa(long vendor, long type) throws InstantiationException, IllegalAccessException { RadiusAttribute attr = null; VendorValue v = vendorValueMap.get(new Long(vendor)); Class<?> c = null; if (v != null) { c = v.typeMap.get(new Long(type)); } if (c != null) { attr = (RadiusAttribute) c.newInstance(); } else { RadiusLog.warn("Unknown Vendor Specific Attribute: " + vendor+":"+type); attr = new Attr_UnknownVSAttribute(vendor, type); } return attr; }