From: Harlan Stenn Date: Sun, 11 Feb 2018 10:20:02 +0000 (-0800) Subject: Initialize ippeerlimit in restrict_def[46]. HStenn X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd90b67edbe49bb6288cc31a678c7e5ebfbd9c30;p=thirdparty%2Fntp.git Initialize ippeerlimit in restrict_def[46]. HStenn bk: 5a8018d2tSnXnyyfKRjX-no-d4l-eg --- diff --git a/ntpd/ntp_restrict.c b/ntpd/ntp_restrict.c index ef453233d..f3c129342 100644 --- a/ntpd/ntp_restrict.c +++ b/ntpd/ntp_restrict.c @@ -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;