]> git.proxmox.com Git - mirror_frr.git/commitdiff
ldpd: set default instance to 1
authorEmanuele Di Pascale <emanuele@voltanet.io>
Wed, 10 Jul 2019 13:20:14 +0000 (15:20 +0200)
committerEmanuele Di Pascale <emanuele@voltanet.io>
Wed, 10 Jul 2019 13:20:27 +0000 (15:20 +0200)
LDP opens two sockets to zebra, one through ldpd (always using
instance 0) and another through lde (using whatever instance
was set through the -n command line parameter). If no instance
was set, both connections would use the same protocol and instance,
making it impossible to distinguish them through zserv_find_client.
This meant that a response to a lm connect would erroneously go to
the wrong process. Fix this by having a default instance value of 1,
in case the user does not specify a different one.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
ldpd/ldpd.c

index 9fccb085ddb19fe6f7d391cd5e19774f3f1bd9f6..a6f0519bd72940330c1524ba0ff13ce3c6fab1ba 100644 (file)
@@ -236,6 +236,9 @@ main(int argc, char *argv[])
                "      --ctl_socket   Override ctl socket path\n"
                "  -n, --instance     Instance id\n");
 
+       /* set default instance (to differentiate ldpd socket from lde one */
+       init.instance = 1;
+
        while (1) {
                int opt;