lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #38061] wrong multicast routing in IPv4


From: Artem Pisarenko
Subject: [lwip-devel] [bug #38061] wrong multicast routing in IPv4
Date: Fri, 11 Jan 2013 07:03:24 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11

URL:
  <http://savannah.nongnu.org/bugs/?38061>

                 Summary: wrong multicast routing in IPv4
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: jblackarty
            Submitted on: Птн 11 Янв 2013 13:03:23
                Category: IPv4
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: CVS Head

    _______________________________________________________

Details:

Sending multicast datagrams doesn't work correct in system having multiple
network interfaces:
1. when there are no default interface, then netconn_send() returns ERR_RTE
2. when default interface set to other interface than we want to send over,
netconn_send() either returns ERR_VAL, or sends datagram via default interface
(or maybe just via first interface in netif list) depending on netconn
configuration.

lwip udp_sendto() function:

#if LWIP_IPV6 || LWIP_IGMP
  if (ipX_addr_ismulticast(PCB_ISIPV6(pcb), dst_ip_route)) {
    /* For multicast, find a netif based on source address. */
#if LWIP_IPV6
    if (PCB_ISIPV6(pcb)) {
      dst_ip_route = &pcb->local_ip;
    } else
#endif /* LWIP_IPV6 */
    {
#if LWIP_IGMP
      dst_ip_route = ip_2_ipX(&pcb->multicast_ip);
#endif /* LWIP_IGMP */
    }
  }
#endif /* LWIP_IPV6 || LWIP_IGMP */

  /* find the outgoing network interface for this packet */
  netif = ipX_route(PCB_ISIPV6(pcb), &pcb->local_ip, dst_ip_route);

Firstly, first comment is wrong about IPv4. Secondly, pcb->multicast_ip is set
only in lwip_setsockopt() and it's value is always zero in my case. Thirdly,
even if pcb->multicast_ip was set to correct address, ip_route (IPv4) can't
find correct netif based on multicast address only.




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?38061>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]