Linux kernel cannot receive multicast -


i built linux kernel config_ip_multicast=y,however no udp multicast package received in kernel while udp unicast works well.

ethtool -s eth0 | grep multicast                          txmulticastframes_g: 0                    txmulticastframes_gb: 0              rxmulticastframes_g: 0 

any hints how can solve problem?

thx. forrest g

================================================================================= additional:
tcpdump can packet

root@jhi # ./tcpdump port 3702 device eth0 entered promiscuous mode tcpdump: verbose output suppressed, use -v or -vv full protocol decode listening on eth0, link-type en10mb (ethernet), capture size 65535 bytes -7:-48:-19.4151 ip 192.168.42.212.3702 > 239.255.255.250.3702: udp, length 787 -7:-48:-19.4661 ip 192.168.42.212.3702 > 239.255.255.250.3702: udp, length 803 ^c 2 packets captured 2 padevice eth0 left promiscuous mode ckets received filter 0 packets dropped kernel 

i write ws-devicediscovery function gsoap. works on x86 machine. when running on arm device, can send out igmp packet not receive anything.

void wsdd()   {           struct soap *soap_udp;        struct ip_mreq mreq;         soap_udp=soap_new();       soap_init1(soap_udp, soap_io_udp|soap_io_flush);        if (!soap_valid_socket(soap_bind(soap_udp, null, 3702, 100)))       {               soap_print_fault(soap_udp, stderr);       }        mreq.imr_multiaddr.s_addr = inet_addr("239.255.255.250");       mreq.imr_interface.s_addr = htonl(inaddr_any);        if(setsockopt(soap_ud->master,ipproto_ip,ip_add_membership,&mreq,sizeof(mreq))==-1)     {           perror("membership error\n");       }      int loop = 1;       int sock_opt = 1;     if ((setsockopt(soap_udp->master, sol_socket, so_reuseaddr, (void *) &sock_opt,                       sizeof (sock_opt))) == -1) {           printf("setsockopt\n");       }       if ((setsockopt(soap_udp->master, ipproto_ip, ip_multicast_loop,                          &loop, sizeof (loop))) == -1) {           printf("setsockopt\n");       }      while(1){           soap_accept(soap_udp);         soap_serve(soap_udp);            soap_end(soap_udp);      }   }  

then have tried these things still not work

route add -net 224.0.0.0 netmask 240.0.0.0 eth0 echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter 

problem solved changing..

ifconfig eth0 promisc 

can explain principle?


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -