haibbo / improxy

IGMP/MLD Proxy which supports IGMPv3 and MLDv2 completely
27 stars 14 forks source link

IPv4 Multicast Address is judged non-multciast-address #1

Closed githubfean closed 10 years ago

githubfean commented 10 years ago

First of all, thanks you a lot for this package. It does help me solve the problem. The only one workable for IGMP/MLD proxy I can find. Thank You.

I try this software on a ARM little endian and got some warning message as title. I fix it and attach the changes. Hope this help someone.

input.c, the "ntohl" part is not existed in original code. I add this to fix the problem.

} else if(p_pia->ss.ss_family == AF_INET) {

    if (!IN_MULTICAST(ntohl(p_pia->v4.sin_addr.s_addr))) {
        IMP_LOG_ERROR("group address %s isn't multicast adddress\n",
                      imp_pi_ntoa(p_pia));
        return -1;
    }

    /*
     *    Address Range                 Size       Designation
     *    -------------                 ----       -----------
     *    224.0.0.0 - 224.0.0.255       (/24)      Local Network Control Block
     *
     *    Addresses in the Local Network Control Block are used for protocol
     *    control traffic that is not forwarded off link.
     *    [RFC 5771 section 4]
     */
haibbo commented 10 years ago

Accepted, Thank you!!!