#! /bin/sh /usr/share/dpatch/dpatch-run
## 090-assert-listen-proxy.dpatch by  <joe@nameserver3.ttec.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

@DPATCH@
diff -urNad freeradius-1.1.0~/src/main/listen.c freeradius-1.1.0/src/main/listen.c
--- freeradius-1.1.0~/src/main/listen.c	2005-11-27 15:47:21.000000000 -0500
+++ freeradius-1.1.0/src/main/listen.c	2005-11-28 08:08:57.000000000 -0500
@@ -562,8 +562,10 @@
  */
 static int auth_socket_send(rad_listen_t *listener, REQUEST *request)
 {
-	rad_assert(request->listener == listener);
-	rad_assert(listener->send == auth_socket_send);
+	if (request->proxy_listener != listener) {
+		rad_assert(request->listener == listener);
+		rad_assert(listener->send == auth_socket_send);
+	}
 
 	/*
 	 *	Ensure that the reply is sane
