Skip to content

Commit

Permalink
Send acct pings to acct port. Fixes #1364
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok authored and arr2036 committed Nov 1, 2015
1 parent fb179e9 commit 72a03f9
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/main/process.c
Expand Up @@ -3450,7 +3450,8 @@ static void ping_home_server(void *ctx, struct timeval *now)
fr_pair_make(request->proxy, &request->proxy->vps,
"Message-Authenticator", "0x00", T_OP_SET);

} else if (home->type == HOME_TYPE_AUTH) {
} else if ((home->type == HOME_TYPE_AUTH) ||
(home->type == HOME_TYPE_AUTH_ACCT)) {
request->proxy->code = PW_CODE_ACCESS_REQUEST;

fr_pair_make(request->proxy, &request->proxy->vps,
Expand All @@ -3462,8 +3463,8 @@ static void ping_home_server(void *ctx, struct timeval *now)
fr_pair_make(request->proxy, &request->proxy->vps,
"Message-Authenticator", "0x00", T_OP_SET);

} else {
#ifdef WITH_ACCOUNTING
} else if (home->type == HOME_TYPE_ACCT) {
request->proxy->code = PW_CODE_ACCOUNTING_REQUEST;

fr_pair_make(request->proxy, &request->proxy->vps,
Expand All @@ -3475,9 +3476,14 @@ static void ping_home_server(void *ctx, struct timeval *now)
vp = fr_pair_make(request->proxy, &request->proxy->vps,
"Event-Timestamp", "0", T_OP_SET);
vp->vp_date = now->tv_sec;
#else
rad_assert("Internal sanity check failed");
#endif

} else {
/*
* Unkown home server type.
*/
talloc_free(request);
return;
}

vp = fr_pair_make(request->proxy, &request->proxy->vps,
Expand Down

0 comments on commit 72a03f9

Please sign in to comment.