FreeRADIUS/freeradius-server — pull request #539 by spbnick (2014-03-06 13:58:53+00:00)
Title: Initialize IPv6 scope in ip_ptonx

Set IPv6 address scope ID (fr_ip_addr_t.scope) to zero in ip_ptonx.

This avoids possible random %{getclient:.foo} IPv6 client lookup
failures due to the scope ID being uninitialized, but then used in
fr_ipaddr_cmp, invoked by client_find, used in xlat_getclient.

The issue was found during a Coverity scan of 3.0.1 and reported as
follows:

freeradius-server-3.0.1/src/main/mainconfig.c:374: var_decl: Declaring variable "ip" without initializer.
freeradius-server-3.0.1/src/main/mainconfig.c:394: uninit_use_in_call: Using uninitialized value "ip". Field "ip.scope" is uninitialized when calling "client_find(RADCLIENT_LIST const *, fr_ipaddr_t const *, int)".
freeradius-server-3.0.1/src/main/client.c:466:3: read_parm: Reading a parameter value.