diff options
Diffstat (limited to 'main/freeradius/fix-scopeid.patch')
-rw-r--r-- | main/freeradius/fix-scopeid.patch | 72 |
1 files changed, 72 insertions, 0 deletions
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: |