static int radius_allowed_address(u_int32_t addr) { ipcp_options *wo = &ipcp_wantoptions[0]; if (!use_radius) { if (prev_allowed_address_hook) return prev_allowed_address_hook(addr); else return -1; } if (radius_allow_any_ip) { return 1; } else if (radius_allow_server_ip) { if (wo->hisaddr && addr == wo->hisaddr) return 1; else return 0; } else if (radius_remote_ip_addr) { if (addr == radius_remote_ip_addr) return 1; else return 0; } else if (wo->accept_remote) { return 1; } else if (wo->hisaddr && addr == wo->hisaddr) { return 1; } return 0; }
static int radius_allowed_address(u_int32_t addr) { if (!use_radius) { if (prev_allowed_address_hook) return prev_allowed_address_hook(addr); else return -1; } if (radius_allow_any_ip) { return 1; } else if (radius_remote_ip_addr) { if (addr != radius_remote_ip_addr) return 0; else return 1; } /* Use the usual ppp options to choose */ return -1; }