From owner-freebsd-stable@FreeBSD.ORG Mon Mar 8 09:37:59 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD3E11065670 for ; Mon, 8 Mar 2010 09:37:59 +0000 (UTC) (envelope-from john.marshall@riverwillow.com.au) Received: from mail1.riverwillow.net.au (mail1.riverwillow.net.au [203.58.93.36]) by mx1.freebsd.org (Postfix) with ESMTP id 0D9D78FC14 for ; Mon, 8 Mar 2010 09:37:58 +0000 (UTC) Received: from rwpc12.mby.riverwillow.net.au (rwpc12.mby.riverwillow.net.au [172.25.24.168]) (authenticated bits=0) by mail1.riverwillow.net.au (8.14.4/8.14.4) with ESMTP id o289bpdR014659 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 8 Mar 2010 20:37:52 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=riverwillow.com.au; s=m1001; t=1268041072; bh=2FlnYO7DOjeMzLEG3wxqNQ/cCIwvkiYBnKKY90xdaAI=; h=Date:From:To:Subject:Message-ID:References:Mime-Version: Content-Type:In-Reply-To; b=tWjsxgxIqp/+6KHf2gL3Ejed/d8leWO7kHzGEHLrotYgoHJXAaYArXgUarNQu7SWm rpLSMsGccFUbmQWonKzke0L5X7iByO2WF+LuidejGvI0xDRvsEf/RFah9Moa7lR5O4 UjbHHVVSbpHTMfGZCQ8iy40Une6g2vdglrJk0CmI= Received: from rwpc12.mby.riverwillow.net.au (localhost [127.0.0.1]) by rwpc12.mby.riverwillow.net.au (8.14.3/8.14.3) with ESMTP id o289boqW005605 for ; Mon, 8 Mar 2010 20:37:50 +1100 (AEDT) (envelope-from john.marshall@riverwillow.com.au) Received: (from john@localhost) by rwpc12.mby.riverwillow.net.au (8.14.3/8.14.3/Submit) id o289bnKO005604 for freebsd-stable@freebsd.org; Mon, 8 Mar 2010 20:37:49 +1100 (AEDT) (envelope-from john) Date: Mon, 8 Mar 2010 20:37:49 +1100 From: John Marshall To: freebsd-stable@freebsd.org Message-ID: <20100308093749.GB963@rwpc12.mby.riverwillow.net.au> Mail-Followup-To: freebsd-stable@freebsd.org References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gj572EiMnwbLXET9" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i OpenPGP: id=A29A84A2 Subject: Re: ntpd multicast TTL X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2010 09:37:59 -0000 --gj572EiMnwbLXET9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, 07 Mar 2010, 16:19 +0000, Christian Weisgerber wrote: > ntpd is a convenient source of multicast packets for testing purposes. > When I add >=20 > broadcast 224.0.1.1 >=20 > to my ntp.conf, ntpd sends a multicast packet with TTL 1 every 64 > seconds. Just as expected. However, when I explicitly specify the > TTL as in >=20 > broadcast 224.0.1.1 ttl 1 >=20 > it sends packets with TTL 32. Trying a few other numbers confirms > that it multiplies the specified TTL by 32. That is not expected. > (I also don't recall this happening the last time I tried it, but > that may have been years ago.) >=20 > Is this simply a bug in ntpd? No, it's just that the ntp's server configuration statements don't use their ttl option to specify network ttl value, but as zero-based index into ntp's ttl value array. The default array is as you describe [1,32,64,96,128,160,192,224] but can be overridden by the ttl configuration statement. So the following lines in your ntp.conf would result in your multicast server transmitting packets with ttl=3D4. ttl 2 4 6 8 broadcast 224.0.1.1 ttl 1 I tripped over this last year when experimenting with ntp multicast. I had to resort to the source code to understand what was happening. It is actually documented. --=20 John Marshall --gj572EiMnwbLXET9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkuUxW0ACgkQw/tAaKKahKKAogCfQzQSQtfYYGMzp7wWN00yiW4m +OEAoIZQzlEddVIGdbRRjojpITYg0/tH =exTv -----END PGP SIGNATURE----- --gj572EiMnwbLXET9--