diff options
author | Timo Teräs <timo.teras@iki.fi> | 2015-09-11 11:12:20 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2015-09-11 11:12:45 +0300 |
commit | b78ae487fbaf26102328625628cbeee4fab28c52 (patch) | |
tree | 1cbf170edfd11591e6b90e2c9f51c23205616adc /main/freeradius | |
parent | f910f5627d6d0cef2b970fee2424e5f010cc9629 (diff) | |
download | aports-b78ae487fbaf26102328625628cbeee4fab28c52.tar.bz2 aports-b78ae487fbaf26102328625628cbeee4fab28c52.tar.xz |
main/freeradius: fix to initialize ipv6 scope always
Diffstat (limited to 'main/freeradius')
-rw-r--r-- | main/freeradius/APKBUILD | 12 | ||||
-rw-r--r-- | main/freeradius/fix-scopeid.patch | 72 |
2 files changed, 80 insertions, 4 deletions
diff --git a/main/freeradius/APKBUILD b/main/freeradius/APKBUILD index d676705799..7e6a749fb1 100644 --- a/main/freeradius/APKBUILD +++ b/main/freeradius/APKBUILD @@ -5,7 +5,7 @@ pkgname=freeradius _realname=freeradius pkgver=3.0.9 -pkgrel=2 +pkgrel=3 pkgdesc="RADIUS (Remote Authentication Dial-In User Service) server" url="http://freeradius.org/" arch="all" @@ -32,6 +32,7 @@ source="ftp://ftp.freeradius.org/pub/freeradius/$_realname-server-$pkgver.tar.gz disable-cert-generation.patch freeradius-305-default-config.patch fix-strerror_r.patch + fix-scopeid.patch " _builddir="$srcdir"/$_realname-server-$pkgver @@ -298,18 +299,21 @@ e27f11a11fa167b5185d3e11de79d3bc freeradius.initd d86558365a1deea4914ed139797805b0 musl-fix-headers.patch ecd9ecfba4cf86a203de6faf8398c44a disable-cert-generation.patch f8a7b00835f2108acc06af212cede16e freeradius-305-default-config.patch -cb234be726652873899aa38aa7abc208 fix-strerror_r.patch" +cb234be726652873899aa38aa7abc208 fix-strerror_r.patch +5171fca6629baeb274a9b17e02683163 fix-scopeid.patch" sha256sums="75bf2820e04723101a8fe39fb84022251d24436cc287c36d696e32ea8b17e5ce freeradius-server-3.0.9.tar.gz 2d5b3e1af1299373182f2c8021bdf45c29db5d82b0a077b965a16ded32cb6292 freeradius.confd a5208f13420c28446b85dfc48cb9193a4651c994d15cc2c9b0bc43734c66e8f0 freeradius.initd 872aaebf86a663f819460d98924a9dc1f3e428facac6930dc98d1e442df1633f musl-fix-headers.patch 008fa3a4da7b3c01df238bf492a8ccda4077289c02c553a60ad8f4439ec136a2 disable-cert-generation.patch 02cad546ffaf3f9be531cb45b96c7fb31f83c717e40ece4ff28a73c86f921f33 freeradius-305-default-config.patch -dd4e861381d30920e7cfeae8edde518760d271eda02100bded3a9f79104e491c fix-strerror_r.patch" +dd4e861381d30920e7cfeae8edde518760d271eda02100bded3a9f79104e491c fix-strerror_r.patch +aad4796f06a5891b3d48d6ded926ffeb7b9fa84cc1c4a1f1be76bced02694023 fix-scopeid.patch" sha512sums="67e2727a44513fb4dc655b2b2ff8b3b0f39233e8cac570b9a20565ffa655225dad95af23c06bb23d124b2a2358aa3e80964c95826e9e64138830b1dd33223145 freeradius-server-3.0.9.tar.gz e248159c0a44f722e405c51c8015d9ad672e42ad0d38ca28f8a051ff911aa4d3e630b9bd4543e9d610940bc4ae50c022594e219ce341b36abe85c572acad418b freeradius.confd ba3c424d4eabb147c7aa3e31575a87ddb26b6a792d2a8714e73d8763e07854326a03a83991a7420246ca06bf0b93d0a6f23ec198f5e48647f9d25b40067e852a freeradius.initd c49e5eec7497fccde5fd09dba1ea9b846e57bc88015bd81640aa531fb5c9b449f37136f42c85fe1d7940c5963aed664b85da28442b388c9fb8cc27873df03b2d musl-fix-headers.patch 09b78c6baa992f82ab81c43aad6792536a4708d460170f0a373e242a5fafe8db10662dc7fcef99a966b828ed91fa7fe38567c961c938de9a447f1ee03aebb142 disable-cert-generation.patch b69b899da6f80dbdb7422847536e37461315ba587a07fedc1eee28b96be7d16993b758ccd34e3a271ce2937d72c6ddff878aec61a3a4c0750deaaa959d10ed5e freeradius-305-default-config.patch -3751a5e55801c983f552f5983a2ff1206b53a39a31f5547e1a2c688ecd6a20895912233d40b16ba5a2285b9484f982ce149b1a345ff3ec1af953e1caf9e8292d fix-strerror_r.patch" +3751a5e55801c983f552f5983a2ff1206b53a39a31f5547e1a2c688ecd6a20895912233d40b16ba5a2285b9484f982ce149b1a345ff3ec1af953e1caf9e8292d fix-strerror_r.patch +41d478c0e40ff82fc36232964037c1ab8ffca9fdbb7dca02ed49319906e751c133b5d7bc7773c645cec6d9d39d1de69cba25e8d59afa8d6662563dd17f35f234 fix-scopeid.patch" diff --git a/main/freeradius/fix-scopeid.patch b/main/freeradius/fix-scopeid.patch new file mode 100644 index 0000000000..a66161d787 --- /dev/null +++ b/main/freeradius/fix-scopeid.patch @@ -0,0 +1,72 @@ +diff -rup freeradius-server-3.0.9.orig/src/lib/misc.c freeradius-server-3.0.9/src/lib/misc.c +--- freeradius-server-3.0.9.orig/src/lib/misc.c 2015-07-08 18:41:25.000000000 +0300 ++++ freeradius-server-3.0.9/src/lib/misc.c 2015-09-11 08:28:07.058984226 +0300 +@@ -334,6 +334,7 @@ int fr_pton6(fr_ipaddr_t *out, char cons + p = strchr(value, '/'); + if (!p) { + out->prefix = 128; ++ out->scope = 0; + out->af = AF_INET6; + + /* +@@ -388,6 +389,7 @@ int fr_pton6(fr_ipaddr_t *out, char cons + } + + out->prefix = (uint8_t) prefix; ++ out->scope = 0; + out->af = AF_INET6; + + return 0; +@@ -852,6 +854,7 @@ int ip_hton(fr_ipaddr_t *out, int af, ch + if (!inet_pton(af, hostname, &(out->ipaddr))) return -1; + + out->af = af; ++ out->scope = 0; + return 0; + } + +diff -rup freeradius-server-3.0.9.orig/src/main/client.c freeradius-server-3.0.9/src/main/client.c +--- freeradius-server-3.0.9.orig/src/main/client.c 2015-07-08 18:41:25.000000000 +0300 ++++ freeradius-server-3.0.9/src/main/client.c 2015-09-11 11:08:22.338353422 +0300 +@@ -1291,12 +1291,14 @@ RADCLIENT *client_afrom_request(RADCLIEN + c->ipaddr.af = AF_INET6; + c->ipaddr.ipaddr.ip6addr = vp->vp_ipv6addr; + c->ipaddr.prefix = 128; ++ c->ipaddr.scope = 0; + cp = cf_pair_alloc(c->cs, "ipv6addr", strvalue, T_OP_SET, T_BARE_WORD, T_BARE_WORD); + } else if (da->attr == PW_FREERADIUS_CLIENT_SRC_IPV6_ADDRESS) { + #ifdef WITH_UDPFROMTO + c->src_ipaddr.af = AF_INET6; + c->src_ipaddr.ipaddr.ip6addr = vp->vp_ipv6addr; + c->src_ipaddr.prefix = 128; ++ c->src_ipaddr.scope = 0; + cp = cf_pair_alloc(c->cs, "src_addr", strvalue, T_OP_SET, T_BARE_WORD, T_BARE_WORD); + #else + RWARN("Server not built with udpfromto, ignoring FreeRADIUS-Client-Src-IPv6-Address"); +@@ -1319,6 +1321,7 @@ RADCLIENT *client_afrom_request(RADCLIEN + case PW_TYPE_IPV6_PREFIX: + if (da->attr == PW_FREERADIUS_CLIENT_IPV6_PREFIX) { + c->ipaddr.af = AF_INET6; ++ c->ipaddr.scope = 0; + memcpy(&c->ipaddr.ipaddr.ip6addr, &vp->vp_ipv6prefix[2], + sizeof(c->ipaddr.ipaddr.ip6addr)); + fr_ipaddr_mask(&c->ipaddr, vp->vp_ipv6prefix[1]); +diff -rup freeradius-server-3.0.9.orig/src/main/radclient.c freeradius-server-3.0.9/src/main/radclient.c +--- freeradius-server-3.0.9.orig/src/main/radclient.c 2015-07-08 18:41:25.000000000 +0300 ++++ freeradius-server-3.0.9/src/main/radclient.c 2015-09-11 08:34:38.550055077 +0300 +@@ -484,6 +484,7 @@ static int radclient_init(TALLOC_CTX *ct + request->packet->dst_ipaddr.af = AF_INET6; + request->packet->dst_ipaddr.ipaddr.ip6addr = vp->vp_ipv6addr; + request->packet->dst_ipaddr.prefix = 128; ++ request->packet->dst_ipaddr.scope = 0; + break; + + case PW_PACKET_SRC_PORT: +@@ -505,6 +506,7 @@ static int radclient_init(TALLOC_CTX *ct + request->packet->src_ipaddr.af = AF_INET6; + request->packet->src_ipaddr.ipaddr.ip6addr = vp->vp_ipv6addr; + request->packet->src_ipaddr.prefix = 128; ++ request->packet->src_ipaddr.scope = 0; + break; + + case PW_DIGEST_REALM: |