Home | History | Annotate | Download | only in radius

Lines Matching refs:das

2  * RADIUS Dynamic Authorization Server (DAS) (RFC 5176)
32 static struct radius_msg * radius_das_disconnect(struct radius_das_data *das,
67 wpa_printf(MSG_INFO, "DAS: Unsupported attribute %u in "
79 wpa_printf(MSG_INFO, "DAS: Invalid NAS-IP-Address from %s:%d",
91 wpa_printf(MSG_INFO, "DAS: Invalid NAS-IPv6-Address from %s:%d",
113 wpa_printf(MSG_INFO, "DAS: Invalid Calling-Station-Id "
145 res = das->disconnect(das->ctx, &attrs);
148 wpa_printf(MSG_INFO, "DAS: NAS mismatch from %s:%d",
153 wpa_printf(MSG_INFO, "DAS: Session not found for request from "
159 "DAS: Multiple sessions match for request from %s:%d",
188 struct radius_das_data *das = eloop_ctx;
212 wpa_printf(MSG_ERROR, "DAS: recvfrom: %s", strerror(errno));
219 wpa_printf(MSG_DEBUG, "DAS: Received %d bytes from %s:%d",
221 if (das->client_addr.u.v4.s_addr != from.sin.sin_addr.s_addr) {
222 wpa_printf(MSG_DEBUG, "DAS: Drop message from unknown client");
228 wpa_printf(MSG_DEBUG, "DAS: Parsing incoming RADIUS packet "
236 if (radius_msg_verify_das_req(msg, das->shared_secret,
237 das->shared_secret_len)) {
238 wpa_printf(MSG_DEBUG, "DAS: Invalid authenticator in packet "
249 das->time_window) {
250 wpa_printf(MSG_DEBUG, "DAS: Unacceptable "
257 } else if (das->require_event_timestamp) {
258 wpa_printf(MSG_DEBUG, "DAS: Missing Event-Timestamp in packet "
267 reply = radius_das_disconnect(das, msg, abuf, from_port);
285 wpa_printf(MSG_DEBUG, "DAS: Unexpected RADIUS code %u in "
291 wpa_printf(MSG_DEBUG, "DAS: Reply to %s:%d", abuf, from_port);
296 wpa_printf(MSG_DEBUG, "DAS: Failed to add "
300 if (radius_msg_finish_das_resp(reply, das->shared_secret,
301 das->shared_secret_len, hdr) <
303 wpa_printf(MSG_DEBUG, "DAS: Failed to add "
311 res = sendto(das->sock, wpabuf_head(rbuf),
315 wpa_printf(MSG_ERROR, "DAS: sendto(to %s:%d): %s",
333 wpa_printf(MSG_INFO, "RADIUS DAS: socket: %s", strerror(errno));
341 wpa_printf(MSG_INFO, "RADIUS DAS: bind: %s", strerror(errno));
353 struct radius_das_data *das;
359 das = os_zalloc(sizeof(*das));
360 if (das == NULL)
363 das->time_window = conf->time_window;
364 das->require_event_timestamp = conf->require_event_timestamp;
365 das->ctx = conf->ctx;
366 das->disconnect = conf->disconnect;
368 os_memcpy(&das->client_addr, conf->client_addr,
369 sizeof(das->client_addr));
371 das->shared_secret = os_malloc(conf->shared_secret_len);
372 if (das->shared_secret == NULL) {
373 radius_das_deinit(das);
376 os_memcpy(das->shared_secret, conf->shared_secret,
378 das->shared_secret_len = conf->shared_secret_len;
380 das->sock = radius_das_open_socket(conf->port);
381 if (das->sock < 0) {
383 "DAS");
384 radius_das_deinit(das);
388 if (eloop_register_read_sock(das->sock, radius_das_receive, das, NULL))
390 radius_das_deinit(das);
394 return das;
398 void radius_das_deinit(struct radius_das_data *das)
400 if (das == NULL)
403 if (das->sock >= 0) {
404 eloop_unregister_read_sock(das->sock);
405 close(das->sock);
408 os_free(das->shared_secret);
409 os_free(das);