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

« back to all changes in this revision

Viewing changes to interface.c

  • Committer: Package Import Robot
  • Author(s): Stéphane Glondu
  • Date: 2013-06-19 21:25:52 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20130619212552-gzarrkfhbicq00uj
Tags: 1.4.2-1
* New upstream release
* Use canonical URLs in Vcs-* fields

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
{
63
63
    struct interface *ifp;
64
64
 
65
 
    assert(!if_conf || strcmp(ifname, if_conf->ifname) == 0);
66
 
 
67
65
    FOR_ALL_INTERFACES(ifp) {
68
66
        if(strcmp(ifp->name, ifname) == 0) {
69
67
            assert(if_conf == NULL);
77
75
 
78
76
    memset(ifp, 0, sizeof(struct interface));
79
77
    strncpy(ifp->name, ifname, IF_NAMESIZE);
80
 
    ifp->conf = if_conf;
 
78
    ifp->conf = if_conf ? if_conf : default_interface_conf;
81
79
    ifp->bucket_time = now.tv_sec;
82
80
    ifp->bucket = BUCKET_TOKENS_MAX;
83
81
    ifp->hello_seqno = (random() & 0xFFFF);