Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the error message when execute ldpd with --enable-tcp-zebra #452

Merged
merged 1 commit into from
May 4, 2017

Conversation

hwchiu
Copy link
Contributor

@hwchiu hwchiu commented May 3, 2017

If we configure the frr with enable-tcp-zebra and execute the ldpd, we will get the following message.
unknown: zclient_serv_path_set: zebra socket `/var/run/frr/zserv.api' does not exist

Since the zclient will use the tcp socket instead of unix domain socket, it won't generate the domain socket file in /var/run/frr/zserv.api.
After we execute ldpd, it passes the -z /xxxx/ options to frr_opt and it will check the domain socket is exist.

Add the define to ldpd, if the HAVE_TCP_ZEBRA has been define, don't pass the -z path to frr_opt.

Signed-off-by: Hung-Weic Chiu sppsorrg@gmail.com

- If we use the option "--enable-tcp-zebra " to configure, the zclient will use the tcp socket instead of unix domain socket.
- The ldpd will pass the "-z path" options to `frr_opt` and that will execute zclient_serv_path_set to check the domain socket.
- Add the define to ldpd, if the "HAVE_TCP_ZEBRA" has been define, don't pass the "-z path" to `frr_opt`.

Signed-off-by: Hung-Weic Chiu <sppsorrg@gmail.com>
@donaldsharp
Copy link
Member

Looks good to me. @rwestphal should look at it too.

@@ -500,8 +500,11 @@ start_child(enum ldpd_process p, char *argv0, int fd_async, int fd_sync,
argv[argc++] = (char *)ctl_sock_custom_path;
}
/* zclient serv path */
#ifdef HAVE_TCP_ZEBRA
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use #ifndef and get rid of the else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the other file use the same pattern "ifdef ... else ...." and I want to keep the coding style consistency.
If we have to add third definition about zcliet connection in the future, I think the pattern consistency can avoid us rearranging the code.

@NetDEF-CI
Copy link
Collaborator

Continous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-597/

This is a comment from an EXPERIMENTAL automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

@rwestphal rwestphal merged commit e614794 into FRRouting:stable/3.0 May 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants