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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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:
|