diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/freeradius/APKBUILD | 6 | ||||
-rw-r--r-- | main/freeradius/allow-request_will_proxy-to-return-an-error.patch | 57 |
2 files changed, 60 insertions, 3 deletions
diff --git a/main/freeradius/APKBUILD b/main/freeradius/APKBUILD index 44571cd3d4..a194e10484 100644 --- a/main/freeradius/APKBUILD +++ b/main/freeradius/APKBUILD @@ -5,7 +5,7 @@ # Maintainer: Leonardo Arena <rnalrd@alpinelinux.org> pkgname=freeradius pkgver=3.0.21 -pkgrel=1 +pkgrel=2 pkgdesc="RADIUS (Remote Authentication Dial-In User Service) server" url="https://freeradius.org/" arch="all" @@ -77,7 +77,7 @@ source="ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-$pkgver.tar.gz readme-setup-script.patch fix-request_running-segfault.patch dont-install-test-tools.patch - 0001-Route-through-post-proxy-when-no-live-home-servers-a.patch + allow-request_will_proxy-to-return-an-error.patch " builddir="$srcdir/$pkgname-server-$pkgver" @@ -395,4 +395,4 @@ f96b7b2e0fc614cb8b70bd500933538e98e05b58718af931a62bc7ba2307600cf8c2a8a99de856ad 55e179d5e6b31d289c2da7f907e494a6a6f5900483fdff8d3bb25ee15a583b8705942eca1f0d5390e91376966e66e457dce9b2cf1a1f61c8eac6d8fb825404dd readme-setup-script.patch 7ddf75901f635216b0d972c14631334a8138e0dbb021685bb6b3a996f38d232b84146c621dae541b00f6149fa401e835d1579bbacd27fad72a80bacd4391b404 fix-request_running-segfault.patch 908c4408ab6538ddd96577e47d5e509b19e227e144655eaa0fd7569ddadbe5b2298e6599b8370847b3bcb5e788067b163b0cb66e1b3afa4d83dc3f724e058674 dont-install-test-tools.patch -4bc8f3d5adaaca58472f6670641828b9f0121ab34daf7a2d67a886b7c6f45b7898bef3fbc2ce1d71da4831319365271b29300e923cad2738ad12be7f12c209a6 0001-Route-through-post-proxy-when-no-live-home-servers-a.patch" +e907bb315bd665c98723ccd4bad3c300138a8707a59c020833af63ce8c8b6570b36a9450eedde0b72abb87ff5fbc01f3f0be40cb40ac092a639315e05ebf9214 allow-request_will_proxy-to-return-an-error.patch" diff --git a/main/freeradius/allow-request_will_proxy-to-return-an-error.patch b/main/freeradius/allow-request_will_proxy-to-return-an-error.patch new file mode 100644 index 0000000000..34e352f423 --- /dev/null +++ b/main/freeradius/allow-request_will_proxy-to-return-an-error.patch @@ -0,0 +1,57 @@ +From 76e95d4300faa4ec0da970345e0043d6811896c5 Mon Sep 17 00:00:00 2001 +From: "Alan T. DeKok" <aland@freeradius.org> +Date: Sat, 18 Apr 2020 19:40:28 -0400 +Subject: [PATCH] allow request_will_proxy() to return an error + +and check it in request_running() +--- + src/main/process.c | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +diff --git a/src/main/process.c b/src/main/process.c +index 1a48517d43..fcd0a0ad06 100644 +--- a/src/main/process.c ++++ b/src/main/process.c +@@ -1598,6 +1598,8 @@ static void request_finish(REQUEST *request, int action) + */ + static void request_running(REQUEST *request, int action) + { ++ int rcode; ++ + VERIFY_REQUEST(request); + + TRACE_STATE_MACHINE; +@@ -1631,7 +1633,8 @@ static void request_running(REQUEST *request, int action) + /* + * We may need to send a proxied request. + */ +- if (request_will_proxy(request)) { ++ rcode = request_will_proxy(request); ++ if (rcode == 1) { + #ifdef DEBUG_STATE_MACHINE + if (rad_debug_lvl) printf("(%u) ********\tWill Proxy\t********\n", request->number); + #endif +@@ -1648,6 +1651,14 @@ static void request_running(REQUEST *request, int action) + process_proxy_reply(request, NULL); + goto req_finished; + } ++ ++ } else if (rcode < 0) { ++ /* ++ * No live home servers, run Post-Proxy-Type Fail. ++ */ ++ (void) setup_post_proxy_fail(request); ++ process_proxy_reply(request, NULL); ++ goto req_finished; + } else + #endif + { +@@ -3082,7 +3093,7 @@ static int request_will_proxy(REQUEST *request) + + if (!home) { + REDEBUG2("Failed to find live home server: Cancelling proxy"); +- return 1; ++ return -1; + } + + do_home: |