misc/139214: libradius and 3 auth radius-servers
Alexander Motin
mav at FreeBSD.org
Mon Sep 28 19:20:03 UTC 2009
The following reply was made to PR misc/139214; it has been noted by GNATS.
From: Alexander Motin <mav at FreeBSD.org>
To: bug-followup at FreeBSD.org, bond at 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--
More information about the freebsd-bugs
mailing list