sock->packet->dst_ipaddr = sock->my_ipaddr;
sock->packet->dst_port = sock->my_port;
- if (sock->request) {
- sock->request->packet = talloc_steal(sock->request, sock->packet);
- }
+ if (sock->request) sock->request->packet = talloc_steal(sock->request, sock->packet);
}
/*
FR_STATS_INC(auth, total_requests);
- /*
- * Re-parent the packet to nothing.
- */
- (void) talloc_steal(NULL, packet);
-
return 1;
}
rad_assert(sock->ssn != NULL);
rad_assert(client != NULL);
- packet = sock->packet;
+ packet = talloc_steal(NULL, sock->packet);
+ sock->packet = NULL;
/*
* Some sanity checks, based on the packet code.
if (!main_config.status_server) {
FR_STATS_INC(auth, total_unknown_types);
WARN("Ignoring Status-Server request due to security configuration");
- rad_free(&sock->packet);
+ rad_free(&packet);
return 0;
}
fun = rad_status_server;
DEBUG("Invalid packet code %d sent from client %s port %d : IGNORED",
packet->code, client->shortname, packet->src_port);
- rad_free(&sock->packet);
+ rad_free(&packet);
return 0;
} /* switch over packet types */
if (!request_receive(NULL, listener, packet, client, fun)) {
FR_STATS_INC(auth, total_packets_dropped);
- rad_free(&sock->packet);
+ rad_free(&packet);
return 0;
}
- sock->packet = NULL; /* we have no need for more partial reads */
-
return 1;
}