jech / babeld

The Babel routing daemon
http://www.irif.fr/~jch/software/babel/
MIT License
385 stars 92 forks source link

Fix allow-duplicates config option not taking effect #99

Closed DanielG closed 1 year ago

DanielG commented 1 year ago

The config parser first matches for "allow-duplicates" (with dash) then again for "allow_duplicates" (with underscore) which can never match.

    if(strcmp(token, "protocol-port") == 0 ||
       strcmp(token, "kernel-priority") == 0 ||
       strcmp(token, "allow-duplicates") == 0 ||
       [...]
       strcmp(token, "kernel-check-interval") == 0) {
        int v;
        c = getint(c, &v, gnc, closure);
        if(c < -1 || v <= 0 || v >= 0xFFFF)
            goto error;
        [...]
        else if(strcmp(token, "allow_duplicates") == 0)
            allow_duplicates = v;
jech commented 1 year ago

Thanks, merged.