[Devel] udp_server.c patch

Federico Giannici giannici at neomedia.it
Sun Oct 30 18:41:23 CET 2005


I just installed OpenSER 1.0.0 on OpenBSD 3.7 amd64. Previously I was 
using SER 0.9.4.

When I launched OpenSER it give the following error:

  0(0) ERROR: udp_init: setsockopt(IP_MULTICAST_LOOP): Invalid argument


Comparing your source with the SER one, I tryed the attached patch and 
it solved the problem.


Bye.

-- 
___________________________________________________
     __
    |-                      giannici at neomedia.it
    |ederico Giannici      http://www.neomedia.it
___________________________________________________
-------------- next part --------------
--- udp_server.c-orig	Sun Oct 30 18:33:14 2005
+++ udp_server.c	Sun Oct 30 18:33:17 2005
@@ -314,8 +314,10 @@
 	if (addr->s.sa_family==AF_INET){
 		if (setsockopt(sock_info->socket, IPPROTO_IP, IP_MULTICAST_LOOP,
 						&mcast_loopback, sizeof(mcast_loopback))==-1){
-			LOG(L_ERR, "ERROR: udp_init: setsockopt(IP_MULTICAST_LOOP): %s\n",
-						strerror(errno));
+			LOG(L_WARN, "WARNING: udp_init: setsockopt(IP_MULTICAST_LOOP):"
+						" %s\n", strerror(errno));
+			/* it's only a warning because we might get this error if the
+			  network interface doesn't support multicasting -- andrei */
 			goto error;
 		}
 		if (mcast_ttl>=0){


More information about the Devel mailing list