From owner-freebsd-bugs@FreeBSD.ORG Mon Sep 28 19: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 D58F11065672 for ; Mon, 28 Sep 2009 19: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 C57488FC27 for ; Mon, 28 Sep 2009 19: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 n8SJK3i2072419 for ; Mon, 28 Sep 2009 19: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 n8SJK3ok072413; Mon, 28 Sep 2009 19:20:03 GMT (envelope-from gnats) Date: Mon, 28 Sep 2009 19:20:03 GMT Message-Id: <200909281920.n8SJK3ok072413@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Alexander Motin Cc: Subject: Re: misc/139214: libradius and 3 auth radius-servers X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexander Motin List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Sep 2009 19:20:03 -0000 The following reply was made to PR misc/139214; it has been noted by GNATS. From: Alexander Motin To: bug-followup@FreeBSD.org, bond@techno-r.ru Cc: Subject: Re: misc/139214: libradius and 3 auth radius-servers Date: Mon, 28 Sep 2009 21:54:41 +0300 This is a multi-part message in MIME format. --------------050703030305070708070608 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Please try this patch. It is made against HEAD, but could be easily adopted to 6.x/7.x. Thank you. -- Alexander Motin --------------050703030305070708070608 Content-Type: text/plain; name="radlib.c.fail.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="radlib.c.fail.patch" --- radlib.c.prev 2009-09-15 20:43:48.000000000 +0300 +++ radlib.c 2009-09-28 21:49:07.000000000 +0300 @@ -650,17 +650,12 @@ rad_continue_send_request(struct rad_han n = sendto(h->fd, h->out, h->out_len, 0, (const struct sockaddr *)&h->servers[h->srv].addr, sizeof h->servers[h->srv].addr); - if (n != h->out_len) { - if (n == -1) - generr(h, "sendto: %s", strerror(errno)); - else - generr(h, "sendto: short write"); - return -1; - } - + if (n != h->out_len) + tv->tv_sec = 1; /* Do not wait full timeout if send failed. */ + else + tv->tv_sec = h->servers[h->srv].timeout; h->try++; h->servers[h->srv].num_tries++; - tv->tv_sec = h->servers[h->srv].timeout; tv->tv_usec = 0; *fd = h->fd; --------------050703030305070708070608--