]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Initialize ippeerlimit in restrict_def[46]. HStenn
authorHarlan Stenn <stenn@ntp.org>
Sun, 11 Feb 2018 10:20:02 +0000 (02:20 -0800)
committerHarlan Stenn <stenn@ntp.org>
Sun, 11 Feb 2018 10:20:02 +0000 (02:20 -0800)
bk: 5a8018d2tSnXnyyfKRjX-no-d4l-eg

ntpd/ntp_restrict.c

index ef453233d8a0421b75b49361eda575f094539dc4..f3c1293425506e0048642636e0616b73e405b9d9 100644 (file)
@@ -86,6 +86,8 @@ static        u_long res_limited_refcnt;
 
 /*
  * Our default entries.
+ *
+ * We can make this cleaner with c99 support: see init_restrict().
  */
 static restrict_u      restrict_def4;
 static restrict_u      restrict_def6;
@@ -221,6 +223,10 @@ init_restrict(void)
         * behavior as but reversed implementation compared to the docs.
         * 
         */
+
+       restrict_def4.ippeerlimit = -1;         /* Cleaner if we have C99 */
+       restrict_def6.ippeerlimit = -1;         /* Cleaner if we have C99 */
+
        LINK_SLIST(restrictlist4, &restrict_def4, link);
        LINK_SLIST(restrictlist6, &restrict_def6, link);
        restrictcount = 2;