Hi All,

 

I am trying to debug, the mcproxy  with Downstream interface being PPPoE 
interface and Upstream being ethernet interface.  

 

Can you help on, weather anybody encountered similar problem ? How to make 
DOWN stream interface to work for PPPoE interfaces ? Any clues/inputs will 
be highly appreciate.

 

Problem:             Though Stream is sending from H1 and Listener running 
at H2, the stream is not reaching H2

Analysis:              Based on debugging, I could guess that at below 
YELLOW highlighted portions of code is being hit and hence not honoring 
JOIN received on a PPPoE  tunnel

                              I think, for a point-point interfaces, the 
netmask will be 255.255.255.255 (Only one host). So, I think based on code 
flow the netmask check fails and not returning valid IFINDEX. JOIN received 
on PPPoE interface is discarded….

 

Setup:

H1 -------------------------------------eth0  mcproxy 
ppp1========PPPoE/CHAP========= ppp1 H2

                                                UPStream              
Downstream                                                           

UDPStream 
sender                                                                          
                                             
UDP listenr/Subscriber/Join

 

 

*CODE flow/inputs*

 

} else if (igmp_hdr->igmp_type == IGMP_V3_MEMBERSHIP_REPORT) {

            HC_LOG_DEBUG("IGMP_V3_MEMBERSHIP_REPORT received");

 

            igmpv3_mc_report* v3_report = 
reinterpret_cast<igmpv3_mc_report*>(igmp_hdr);

            igmpv3_mc_record* rec = 
reinterpret_cast<igmpv3_mc_record*>(reinterpret_cast<unsigned 
char*>(v3_report) + sizeof(igmpv3_mc_report));

 

            int num_records = ntohs(v3_report->num_of_mc_records);

            HC_LOG_DEBUG("\tnum of multicast records: " << num_records);

 

            saddr = ip_hdr->ip_src;

            HC_LOG_DEBUG("\tsaddr: " << saddr);

 

            if ((if_index = m_interfaces->get_if_index(saddr)) == 0) {

*               HC_LOG_DEBUG("no if_index found");*

               return;

            }

 

 

 

unsigned int interfaces::get_if_index(const addr_storage& saddr) const

{

    HC_LOG_TRACE("");

 

    addr_storage recv_subnet;

    addr_storage src_subnet;

   

    const if_prop_map* prop_map;

 

    if (saddr.get_addr_family() == AF_INET) {

        prop_map = m_if_prop.get_if_props();

        for (auto & e : *prop_map) {

            if (e.second.ip4_addr != nullptr && 
e.second.ip4_addr->ifa_netmask != nullptr && e.second.ip4_addr->ifa_addr != 
nullptr) {

                recv_subnet = *e.second.ip4_addr->ifa_netmask;

                src_subnet = *e.second.ip4_addr->ifa_addr;

                src_subnet.mask_ipv4(recv_subnet);

                if (src_subnet == recv_subnet.mask_ipv4(saddr)) {

                    return get_if_index(e.second.ip4_addr->ifa_name);

                }

            }

        }

    }else{

        HC_LOG_WARN("cannot map IPv6 addr to interface index:" << saddr);

    }

*    return INTERFACES_UNKOWN_IF_INDEX;*

*}*

 

 

 

addr_storage& addr_storage::mask_ipv4(const addr_storage& subnet_mask)

{

    if (this->get_addr_family() == AF_INET && subnet_mask.get_addr_family() 
== AF_INET) {

       * get_in_addr_mutable().s_addr &= subnet_mask.get_in_addr().s_addr;*

        return *this;

    } else {

        HC_LOG_ERROR("incompatible ip versions");

    }

 

    return *this;

}    

 

Regards,

Ganesh

-- 
You received this message because you are subscribed to the Google Groups 
"Multicast Proxy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to