[Babel-users] bugs in send_multicast_request

Dave Taht dave.taht at gmail.com
Sun Nov 25 09:56:37 GMT 2018


I think there are two bugs in this routine in babel head. The first,
makes it a no-op, the second, well, I was unsure of your intent, and
it's 2am here and I've otherwise been generating too much noise
lately... but... see below

void send_multicast_request(struct interface *ifp,
                const unsigned char *prefix, unsigned char plen,
                 const unsigned char *src_prefix, unsigned char src_plen)

{

    if(ifp == NULL) {

        struct interface *ifp_auxn;

        FOR_ALL_INTERFACES(ifp_auxn) {

            if(if_up(ifp_auxn))
^^^^^^^^^^^^^ should be !
                continue;

            send_multicast_request(ifp_auxn, prefix, plen, src_prefix,
src_plen);

        }

        return;

    }


    if(!if_up(ifp))
        return

because the whole routine is now always no-op.

2nd bug:

    /* make sure any buffered updates go out before this request. */

    flushupdates(ifp);



    if((ifp->flags & IF_UNICAST) != 0) {

        struct neighbour *neigh;

        FOR_ALL_NEIGHBOURS(neigh) {

            if(neigh->ifp == ifp) {

                send_request(&neigh->buf, prefix, plen,

                             src_prefix, src_plen);

            } else {

                send_request(&ifp->buf, prefix, plen, src_prefix, src_plen);
^^^^^^ this gets sent multiple times
            }

        }

    } and was probably meant to be at the end of the if unicast

        return;




-- 

Dave Täht
CTO, TekLibre, LLC
http://www.teklibre.com
Tel: 1-831-205-9740



More information about the Babel-users mailing list