aboutsummaryrefslogtreecommitdiffstats
path: root/main/freeradius/freeradius-3010-send-acct-pings-to-acct-port.patch
blob: 3dbd210e35d6ceefc0d6296cfb7105d536cdefd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
--- a/src/main/process.c
+++ b/src/main/process.c
@@ -3479,7 +3479,8 @@
 		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,
@@ -3491,8 +3492,8 @@
 		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,
@@ -3504,9 +3505,14 @@
 		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,
Only in b: src/main/process.c.orig
Only in b: src/main/process.c.rej