]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 3485] Undefined sockaddr used in error messages in ntp_config.c
authorJuergen Perlinger <perlinger@ntp.org>
Wed, 11 Apr 2018 05:59:51 +0000 (07:59 +0200)
committerJuergen Perlinger <perlinger@ntp.org>
Wed, 11 Apr 2018 05:59:51 +0000 (07:59 +0200)
bk: 5acda457xM-KveWTlE5JHBJOthLr4Q

ChangeLog
ntpd/ntp_config.c

index fefc2bf5fa2857a91fea58776c75a58b409566e3..c334512ce76b82337c03c4043a59c5cc7cc3be96 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 ---
 
+* [Bug 3485] Undefined sockaddr used in error messages in ntp_config.c <perlinger@ntp.org>
+  - applied patch by Gerry Garvey
 * [Bug 3480] Refclock sample filter not cleared on clock STEP <perlinger@ntp.org>
   - applied patch by Gerry Garvey
 * [Bug 3479] ctl_putrefid() allows unsafe characters through to ntpq <perlinger@ntp.org>
index f3c283cb692fc3f36066eb7dc6bc478591cfa27a..58f8102ee221cf7f0d17e751e0917aa2ffa34707 100644 (file)
@@ -3626,10 +3626,8 @@ config_fudge(
                        err_flag = 1;
                        msyslog(LOG_ERR,
                                "unrecognized fudge reference clock address %s, line ignored",
-                               stoa(&addr_sock));
-               }
-
-               if (!ISREFCLOCKADR(&addr_sock)) {
+                               addr_node->address);
+               } else if (!ISREFCLOCKADR(&addr_sock)) {
                        err_flag = 1;
                        msyslog(LOG_ERR,
                                "inappropriate address %s for the fudge command, line ignored",
@@ -3701,7 +3699,7 @@ config_fudge(
                                msyslog(LOG_ERR,
                                        "Unexpected fudge flag %s (%d) for %s",
                                        token_name(curr_opt->attr),
-                                       curr_opt->attr, stoa(&addr_sock));
+                                       curr_opt->attr, addr_node->address);
                                exit(curr_opt->attr ? curr_opt->attr : 1);
                        }
                }