From owner-freebsd-bugs@FreeBSD.ORG Mon Sep 28 14:20:03 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8CE21065693 for ; Mon, 28 Sep 2009 14:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A5AF48FC3E for ; Mon, 28 Sep 2009 14:20:03 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8SEK3U0065153 for ; Mon, 28 Sep 2009 14:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8SEK3NT065152; Mon, 28 Sep 2009 14:20:03 GMT (envelope-from gnats) Resent-Date: Mon, 28 Sep 2009 14:20:03 GMT Resent-Message-Id: <200909281420.n8SEK3NT065152@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Sergey Bondarev Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 341C6106566B for ; Mon, 28 Sep 2009 14:10:02 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 226358FC08 for ; Mon, 28 Sep 2009 14:10:02 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n8SEA1hf001118 for ; Mon, 28 Sep 2009 14:10:01 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n8SEA0EQ001117; Mon, 28 Sep 2009 14:10:00 GMT (envelope-from nobody) Message-Id: <200909281410.n8SEA0EQ001117@www.freebsd.org> Date: Mon, 28 Sep 2009 14:10:00 GMT From: Sergey Bondarev To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/139214: libradius and 3 auth radius-servers X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Sep 2009 14:20:04 -0000 >Number: 139214 >Category: misc >Synopsis: libradius and 3 auth radius-servers >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Sep 28 14:20:03 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Sergey Bondarev >Release: 6.4 >Organization: >Environment: FreeBSD r5.ru 6.4-RELEASE-p3 FreeBSD 6.4-RELEASE-p3 #1: Sun Feb 1 16:19:33 MSK 2009 bond@r5.ru:/usr/obj/usr/src/sys/YADROPU i386 >Description: radius.conf acct 10.255.1.1 radius_password auth 10.250.1.100 radius_password auth 10.250.1.250 radius_password auth 10.255.1.1 radius_password Situation: 1. Freeradius on host 10.250.1.100 is not started, mpd4.4.1 try to auth user on radius-server. libradius try 10.250.1.100 - wait timeout, then try 10.250.1.250 and succefully authentificate user. 2. HOST 10.205.1.100 is DOWN. mpd4.4.1 try to auth user on radius-server. libradius try 10.250.1.100, get error -1 and exit. libradius do not try other auth-radius-servers !!! mpd.log Sep 28 15:06:25 r5 mpd: [pptp14] AUTH: Auth-Thread started Sep 28 15:06:25 r5 mpd: [pptp14] AUTH: Trying RADIUS Sep 28 15:06:25 r5 mpd: [pptp14] RADIUS: RadiusAuthenticate for: user_login Sep 28 15:06:25 r5 mpd: [pptp14] RADIUS: rad_init_send_request failed: -1 sendto: Host is down Sep 28 15:06:25 r5 mpd: [pptp14] AUTH: RADIUS returned undefined Sep 28 15:06:25 r5 mpd: [pptp14] AUTH: Trying INTERNAL I see to radlib.c source: /* Send the request */ n = sendto(h->fd, h->request, h->req_len, 0, (const struct sockaddr *)&h->servers[h->srv].addr, sizeof h->servers[h->srv].addr); if (n != h->req_len) { if (n == -1) generr(h, "sendto: %s", strerror(errno)); else generr(h, "sendto: short write"); return -1; } Maybe remove "return -1;" ? Backup (round-robin) radius server configuration is no work ! >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: