[Xorp-hackers] XORP PIMSM6 and IPv6 multicast forwarding patch

Pavlin Radoslavov pavlin@icir.org
Fri, 28 Oct 2005 10:28:27 -0700


> Hi, all
> 
> 	 I Tried this with XORP but it looks like does not work. 
> 
>        There is already IPv6 multicast forwarding patch for the Linux kernel 
>       (http://clarinet.u-strasbg.fr/~hoerdt/linux_ipv6_mforwarding/)
>      
>      The error message is "adopt_mrouter_socket() failed: IPv6 multicast routing not supported" in xorp/fea/mfea_mrouter.cc line 419( I  used Xorp 1.1 tarball) as follows:
> 	#ifndef HAVE_IPV6_MULTICAST_ROUTING
> 		XLOG_ERROR("adopt_mrouter_socket() failed: "
> 		   "IPv6 multicast routing not supported");
> 		return (XORP_ERROR);
> 	#else
> 	blabla....
> 
>     HAVE_IPV6_MULTICAST_ROUTING is not defined. Any hint on this? 
> 	What is the best place should I define this?
> 	Any other similar defination?

The ./configure script should detect whether the system has IPv6
multicast forwarding support and it will #define HAVE_IPV6_MULTICAST_ROUTING
if detected.

I think that the particular test for multicast routing support
(defined in config/acipv6.m4) does not work for Linux.
To fix the test, could you try to compile the following program.
If it fails, please let me know the particular error message and I
will try to fix it. Quite likely the failure would be because of
some additional header files that should be included.

Also, please double-check that in your config.h HAVE_IPV6 and
HAVE_IPV6_MULTICAST are defined to 1.

Pavlin


/*****************************/
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <net/if.h>
/* #include <net/if_var.h> */
#include <netinet/in.h>
/* #include <netinet/in_var.h> */
/* #include <netinet6/ip6_mroute.h> */
#include <linux/mroute6.h>

int
main()
{
    int dummy = 0;

    /* Dummy integer values that must be defined in some of the header files */
    dummy += IPPROTO_ICMPV6;
    dummy += MRT6_INIT;
    dummy += MRT6_ADD_MIF;
    dummy += MRT6_DEL_MIF;
    dummy += MRT6_ADD_MFC;
    dummy += MRT6_DEL_MFC;
    dummy += MRT6MSG_NOCACHE;
    dummy += MRT6MSG_WRONGMIF;
    dummy += MRT6MSG_WHOLEPKT;

#ifndef SIOCGETSGCNT_IN6
#error Missing SIOCGETSGCNT_IN6
#endif
#ifndef SIOCGETMIFCNT_IN6
#error Missing SIOCGETMIFCNT_IN6
#endif

    exit (0);
}
/*****************************/