Skip to content

Commit

Permalink
revert code to 3.0 behavior. Fixes #1616
Browse files Browse the repository at this point in the history
If there's no 'ipaddr' in the listen section, tell the admin
to set one.  Do NOT invent "ipaddr = *".
  • Loading branch information
alandekok committed Sep 25, 2016
1 parent fcaacf5 commit 270abf8
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/main/listen.c
Expand Up @@ -1312,14 +1312,9 @@ int common_socket_parse(CONF_SECTION *cs, rad_listen_t *this)
if (rcode != 0) rcode = cf_pair_parse(cs, "ipv6addr",
FR_ITEM_POINTER(PW_TYPE_IPV6_ADDR, &ipaddr), NULL, T_INVALID);
if (rcode < 0) return -1;
/*
* Default to IPv4 INADDR_ANY
*/
if (rcode != 0) {
memset(&ipaddr, 0, sizeof(ipaddr));
ipaddr.af = INADDR_ANY;
ipaddr.prefix = 32;
ipaddr.ipaddr.ip4addr.s_addr = htonl(INADDR_ANY);
cf_log_err_cs(cs, "No address specified in listen section");
return -1;
}

rcode = cf_pair_parse(cs, "port", FR_ITEM_POINTER(PW_TYPE_SHORT, &sock->my_port), "0", T_BARE_WORD);
Expand Down

0 comments on commit 270abf8

Please sign in to comment.