Skip to content

Commit

Permalink
set recv_buff = 0 for replication
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Feb 24, 2020
1 parent 917700e commit d9fb77f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/modules/rlm_radius/rlm_radius_udp.c
Expand Up @@ -2102,9 +2102,17 @@ static int mod_instantiate(void *instance, CONF_SECTION *conf)
return -1;
}

if (inst->recv_buff_is_set) {
FR_INTEGER_BOUND_CHECK("recv_buff", inst->recv_buff, >=, inst->max_packet_size);
FR_INTEGER_BOUND_CHECK("recv_buff", inst->recv_buff, <=, (1 << 30));
if (!inst->replicate) {
if (inst->recv_buff_is_set) {
FR_INTEGER_BOUND_CHECK("recv_buff", inst->recv_buff, >=, inst->max_packet_size);
FR_INTEGER_BOUND_CHECK("recv_buff", inst->recv_buff, <=, (1 << 30));
}
} else {
/*
* Replicating: Set the receive buffer to zero.
*/
inst->recv_buff_is_set = true;
inst->recv_buff = 0;
}

if (inst->send_buff_is_set) {
Expand Down

0 comments on commit d9fb77f

Please sign in to comment.