diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2017-10-09 18:28:21 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2017-10-09 18:28:21 +0300 |
commit | 92af4b9535a8d9eee6800157a72fc87572b54df9 (patch) | |
tree | f1a9ef7f60d4814a6f0c673b7fce9f4d640c01f8 /accel-pppd/radius/radius_p.h | |
parent | 2635997039354e3f992f5c2d5d18328794e2c44e (diff) | |
download | accel-ppp-xebd-92af4b9535a8d9eee6800157a72fc87572b54df9.tar.gz accel-ppp-xebd-92af4b9535a8d9eee6800157a72fc87572b54df9.zip |
radius: split request queue to 2 subqueues
1 - is high priority queue for Access-Request and Account-Request(Start)
2 - is low priority queue for Account-Request(Alive) and Account-Request(Stop)
This patch intended to prioritize sessions connecting requests over disconnects and interim updates.
Diffstat (limited to 'accel-pppd/radius/radius_p.h')
-rw-r--r-- | accel-pppd/radius/radius_p.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/accel-pppd/radius/radius_p.h b/accel-pppd/radius/radius_p.h index a01467d..3554118 100644 --- a/accel-pppd/radius/radius_p.h +++ b/accel-pppd/radius/radius_p.h @@ -83,8 +83,10 @@ struct rad_req_t { in_addr_t server_addr; int server_port; - int type:8; - int try:6; + int type; + int prio; + int try; + int active:1; int async:1; @@ -113,7 +115,7 @@ struct rad_server_t { int fail_timeout; int max_fail; - struct list_head req_queue; + struct list_head req_queue[2]; int client_cnt[2]; time_t fail_time; int timeout_cnt; @@ -180,7 +182,7 @@ struct radius_pd_t *rad_find_session_pack(struct rad_packet_t *pack); int rad_dict_load(const char *fname); void rad_dict_free(struct rad_dict_t *dict); -struct rad_req_t *rad_req_alloc(struct radius_pd_t *rpd, int code, const char *username); +struct rad_req_t *rad_req_alloc(struct radius_pd_t *rpd, int code, const char *username, int prio); struct rad_req_t *rad_req_alloc2(struct radius_pd_t *rpd, int code, const char *username, in_addr_t addr, int port); struct rad_req_t *rad_req_alloc_empty(); int rad_req_acct_fill(struct rad_req_t *); |