Merge branch 'radius-ext'
Bring some extensions to eap-radius, namely a virtual IP address provider based on received Framed-IPs, forwarding of Cisco Unity banners, Interim Accounting updates and the reporting of sent/received packets.
This commit is contained in:
@@ -1910,7 +1910,8 @@ METHOD(kernel_ipsec_t, update_sa, status_t,
|
||||
|
||||
METHOD(kernel_ipsec_t, query_sa, status_t,
|
||||
private_kernel_klips_ipsec_t *this, host_t *src, host_t *dst,
|
||||
u_int32_t spi, u_int8_t protocol, mark_t mark, u_int64_t *bytes)
|
||||
u_int32_t spi, u_int8_t protocol, mark_t mark,
|
||||
u_int64_t *bytes, u_int64_t *packets)
|
||||
{
|
||||
return NOT_SUPPORTED; /* TODO */
|
||||
}
|
||||
@@ -2648,4 +2649,3 @@ kernel_klips_ipsec_t *kernel_klips_ipsec_create()
|
||||
|
||||
return &this->public;
|
||||
}
|
||||
|
||||
|
||||
@@ -1594,7 +1594,8 @@ static void get_replay_state(private_kernel_netlink_ipsec_t *this,
|
||||
|
||||
METHOD(kernel_ipsec_t, query_sa, status_t,
|
||||
private_kernel_netlink_ipsec_t *this, host_t *src, host_t *dst,
|
||||
u_int32_t spi, u_int8_t protocol, mark_t mark, u_int64_t *bytes)
|
||||
u_int32_t spi, u_int8_t protocol, mark_t mark,
|
||||
u_int64_t *bytes, u_int64_t *packets)
|
||||
{
|
||||
netlink_buf_t request;
|
||||
struct nlmsghdr *out = NULL, *hdr;
|
||||
@@ -1671,7 +1672,14 @@ METHOD(kernel_ipsec_t, query_sa, status_t,
|
||||
}
|
||||
else
|
||||
{
|
||||
*bytes = sa->curlft.bytes;
|
||||
if (bytes)
|
||||
{
|
||||
*bytes = sa->curlft.bytes;
|
||||
}
|
||||
if (packets)
|
||||
{
|
||||
*packets = sa->curlft.packets;
|
||||
}
|
||||
status = SUCCESS;
|
||||
}
|
||||
memwipe(out, len);
|
||||
|
||||
@@ -810,7 +810,7 @@ static kernel_algorithm_t compression_algs[] = {
|
||||
static int lookup_algorithm(transform_type_t type, int ikev2)
|
||||
{
|
||||
kernel_algorithm_t *list;
|
||||
int alg = 0;
|
||||
u_int16_t alg = 0;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
@@ -1767,7 +1767,8 @@ METHOD(kernel_ipsec_t, update_sa, status_t,
|
||||
|
||||
METHOD(kernel_ipsec_t, query_sa, status_t,
|
||||
private_kernel_pfkey_ipsec_t *this, host_t *src, host_t *dst,
|
||||
u_int32_t spi, u_int8_t protocol, mark_t mark, u_int64_t *bytes)
|
||||
u_int32_t spi, u_int8_t protocol, mark_t mark,
|
||||
u_int64_t *bytes, u_int64_t *packets)
|
||||
{
|
||||
unsigned char request[PFKEY_BUFFER_SIZE];
|
||||
struct sadb_msg *msg, *out;
|
||||
@@ -1816,7 +1817,15 @@ METHOD(kernel_ipsec_t, query_sa, status_t,
|
||||
free(out);
|
||||
return FAILED;
|
||||
}
|
||||
*bytes = response.lft_current->sadb_lifetime_bytes;
|
||||
if (bytes)
|
||||
{
|
||||
*bytes = response.lft_current->sadb_lifetime_bytes;
|
||||
}
|
||||
if (packets)
|
||||
{
|
||||
/* not supported by PF_KEY */
|
||||
*packets = 0;
|
||||
}
|
||||
|
||||
free(out);
|
||||
return SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user