~ubuntu-branches/ubuntu/utopic/babeld/utopic-proposed

« back to all changes in this revision

Viewing changes to message.c

  • Committer: Package Import Robot
  • Author(s): Stéphane Glondu
  • Date: 2013-05-26 21:03:16 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20130526210316-6yd2mu09pctqo36y
Tags: 1.4.1-1
* New upstream release (Closes: #709919)
* Add logrotate support (Closes: #659618)
* Switch debian/copyright to format version 1.0
* Bump Standards-Version to 3.9.4
* Bump debhelper compat level to 9

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
 
44
44
unsigned char packet_header[4] = {42, 2};
45
45
 
46
 
int parasitic = 0;
47
46
int split_horizon = 1;
48
47
 
49
48
unsigned short myseqno = 0;
275
274
            changed = update_neighbour(neigh, seqno, interval);
276
275
            update_neighbour_metric(neigh, changed);
277
276
            if(interval > 0)
278
 
                schedule_neighbours_check(interval * 10, 0);
 
277
                /* Multiply by 3/2 to allow hellos to expire. */
 
278
                schedule_neighbours_check(interval * 15, 0);
279
279
        } else if(type == MESSAGE_IHU) {
280
280
            unsigned short txcost, interval;
281
281
            unsigned char address[16];
296
296
                neigh->ihu_interval = interval;
297
297
                update_neighbour_metric(neigh, changed);
298
298
                if(interval > 0)
299
 
                    schedule_neighbours_check(interval * 10 * 3, 0);
 
299
                    /* Multiply by 3/2 to allow neighbours to expire. */
 
300
                    schedule_neighbours_check(interval * 45, 0);
300
301
            }
301
302
        } else if(type == MESSAGE_ROUTER_ID) {
302
303
            if(len < 10) {
1120
1121
        return;
1121
1122
 
1122
1123
    if(prefix) {
1123
 
        if(!parasitic || find_xroute(prefix, plen)) {
1124
 
            debugf("Sending update to %s for %s.\n",
1125
 
                   ifp->name, format_prefix(prefix, plen));
1126
 
            buffer_update(ifp, prefix, plen);
1127
 
        }
 
1124
        debugf("Sending update to %s for %s.\n",
 
1125
               ifp->name, format_prefix(prefix, plen));
 
1126
        buffer_update(ifp, prefix, plen);
1128
1127
    } else {
1129
1128
        send_self_update(ifp);
1130
 
        if(!parasitic) {
1131
 
            debugf("Sending update to %s for any.\n", ifp->name);
1132
 
            for_all_installed_routes(buffer_update_callback, ifp);
1133
 
        }
 
1129
        debugf("Sending update to %s for any.\n", ifp->name);
 
1130
        for_all_installed_routes(buffer_update_callback, ifp);
1134
1131
        set_timeout(&ifp->update_timeout, ifp->update_interval);
1135
1132
        ifp->last_update_time = now.tv_sec;
1136
1133
    }