Commits

Dmitry Tejblum authored and Denis Ovsienko committed 08a7a91646a
zclient: fix router-id calculation for IPv6 (#595)

If router-id is not specified in ospf6d.conf, ospf6d will get it from the zebra daemon. But ospf6d originates Link LSAs before the router-id is returned by zebra, thus this router's Link LSAs will be flooded with AdvRouter set to 0. * zclient.c: zclient_start(): send ZEBRA_INTERFACE_ADD message after ZEBRA_ROUTER_ID_ADD, not before
No tags

lib/zclient.c

Modified
332 332 zlog_warn("%s: set_nonblocking(%d) failed", __func__, zclient->sock);
333 333
334 334 /* Clear fail count. */
335 335 zclient->fail = 0;
336 336 if (zclient_debug)
337 337 zlog_debug ("zclient connect success with socket [%d]", zclient->sock);
338 338
339 339 /* Create read thread. */
340 340 zclient_event (ZCLIENT_READ, zclient);
341 341
342 - /* We need interface information. */
343 - zebra_message_send (zclient, ZEBRA_INTERFACE_ADD);
344 -
345 342 /* We need router-id information. */
346 343 zebra_message_send (zclient, ZEBRA_ROUTER_ID_ADD);
347 344
345 + /* We need interface information. */
346 + zebra_message_send (zclient, ZEBRA_INTERFACE_ADD);
347 +
348 348 /* Flush all redistribute request. */
349 349 for (i = 0; i < ZEBRA_ROUTE_MAX; i++)
350 350 if (i != zclient->redist_default && zclient->redist[i])
351 351 zebra_redistribute_send (ZEBRA_REDISTRIBUTE_ADD, zclient, i);
352 352
353 353 /* If default information is needed. */
354 354 if (zclient->default_information)
355 355 zebra_message_send (zclient, ZEBRA_REDISTRIBUTE_DEFAULT_ADD);
356 356
357 357 return 0;

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut