Re: [dnssd] SRP: how to remove all published services?

Ted Lemon <mellon@fugue.com> Fri, 15 September 2023 18:40 UTC

Return-Path: <mellon@fugue.com>
X-Original-To: dnssd@ietfa.amsl.com
Delivered-To: dnssd@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 22929C14CE3B for <dnssd@ietfa.amsl.com>; Fri, 15 Sep 2023 11:40:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.906
X-Spam-Level:
X-Spam-Status: No, score=-6.906 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=fugue-com.20230601.gappssmtp.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q2oNklD3LdTF for <dnssd@ietfa.amsl.com>; Fri, 15 Sep 2023 11:40:41 -0700 (PDT)
Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0AB4AC14CE40 for <dnssd@ietf.org>; Fri, 15 Sep 2023 11:40:40 -0700 (PDT)
Received: by mail-qv1-xf2e.google.com with SMTP id 6a1803df08f44-655cee6f752so12944596d6.0 for <dnssd@ietf.org>; Fri, 15 Sep 2023 11:40:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fugue-com.20230601.gappssmtp.com; s=20230601; t=1694803240; x=1695408040; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=AUBGvMyZIYcLnAmBgz3jdUIPv/6aQPz9/SKnUAe7w2s=; b=eknk+E2tJjOqMfL+UK5dw9VN21/noXmG6iEXuVI5jeXEDATWtMTxxrOfoA44C4N5JC K4h919r3jb5m/vAQFNQWfSf7iLyuT8ybq2m/9XD3F+Kkxy97h0MFDkOXfq7XWP1pgoTk tYTSuusQlyvVAI702AAsaj1uKSHF0U2NInU7SB9IV+KRTfFM9eYSbF91/cDEa5rdWCP3 ewNCz3Kckg3EuHC4hCSQ5wavJsR8jQuXg/vDw2niM/+7dxbSiMlbmjtI973vpvitEoQP GduUWj/3TDSV9Itvm/vKoPM53Y5hIyX+8ZGkecmgseW660XXA9mru7+QVQtGY2uz+z8K WlLQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694803240; x=1695408040; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AUBGvMyZIYcLnAmBgz3jdUIPv/6aQPz9/SKnUAe7w2s=; b=AzdhPFVxEpeycrMU5OX9H5g8Z3OXxjWy82+cQJEniTgansPQe7yOcCc+T3MiOcVJSj ZUTjwVHhXF7PHHmhTXziKZ23WNKARnn8Ir9LnXBQ/u9VnQv/zotLKICoztAPboIJz8f+ lwnSp7qU5sxkWauIJrndf+012Cv1V5W7E7+/aK+vdcsrEakPxFCxvyTYjQp4Do5lqnM+ BlsO2hSJD7T+ZXaI4NAiDnp7eZ7SSP5hiVh8Xlaq/LUD0RtHNBAYHZkr1V4RRDEq0KEA 21WZTMrzjZ1GbZAlOpUhRFRqZWK6eACjaZIjZafeq48YxMAoWgsVi/kjcdE/diwabGz3 OfNA==
X-Gm-Message-State: AOJu0YydbZq6LrgTr19FUffe5H2S6+zdAWJneCCEsw+zmvaHsxfwiRBH bsCTfxE0JiwoHorMivJuVyXEjH8l7CP3MDJdj6WqO96b11BuubTb3Bc=
X-Google-Smtp-Source: AGHT+IFxT+BZBPWmu4/YI/9TTFFsDWSmC5pZDWTawtJ8VOj+2Y91NT+YY8zYruwQh6R928S1ZnKj7sg8Tw44tAMa3XA=
X-Received: by 2002:a0c:b295:0:b0:655:d6af:1c37 with SMTP id r21-20020a0cb295000000b00655d6af1c37mr2233605qve.65.1694803239817; Fri, 15 Sep 2023 11:40:39 -0700 (PDT)
MIME-Version: 1.0
References: <DU0P190MB1978B5A8AA3745770E94EEA5FDF6A@DU0P190MB1978.EURP190.PROD.OUTLOOK.COM> <CAGwZUDtz86KtOvtxeACGSDP9dSCJdoKGWHQ_5imVwZYQDom4yQ@mail.gmail.com> <CAPt1N1kjMmnVMkkE7hsbnzf-T79GKSrcL3_oC8X_Pm47_xvkbw@mail.gmail.com> <CAPt1N1kMPCtvT6KdMzF3mKWJQH7R2mJhUxYsBcU7ADtp2=9Abg@mail.gmail.com> <DU0P190MB1978C0CFEB3339C308FBF30DFDF6A@DU0P190MB1978.EURP190.PROD.OUTLOOK.COM>
In-Reply-To: <DU0P190MB1978C0CFEB3339C308FBF30DFDF6A@DU0P190MB1978.EURP190.PROD.OUTLOOK.COM>
From: Ted Lemon <mellon@fugue.com>
Date: Fri, 15 Sep 2023 14:40:04 -0400
Message-ID: <CAPt1N1nAtyg4_gNCbp_qQ0_VHPxBVWGJ4sa-4p+cuoKqktb_3g@mail.gmail.com>
To: Esko Dijk <esko.dijk@iotconsultancy.nl>
Cc: Jonathan Hui <jonhui=40google.com@dmarc.ietf.org>, "dnssd@ietf.org" <dnssd@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000012ee0006056a2185"
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnssd/Q8I8ojRME51WetimCMjnUw-4l50>
Subject: Re: [dnssd] SRP: how to remove all published services?
X-BeenThere: dnssd@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Discussion of extensions to DNS-based service discovery for routed networks." <dnssd.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dnssd>, <mailto:dnssd-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dnssd/>
List-Post: <mailto:dnssd@ietf.org>
List-Help: <mailto:dnssd-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dnssd>, <mailto:dnssd-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Sep 2023 18:40:44 -0000

The intention was certainly that the update deleting all records associated
with a host should only include the host instruction.

On Fri, Sep 15, 2023 at 12:29 PM Esko Dijk <esko.dijk@iotconsultancy.nl>
wrote:

> Thanks, I didn’t yet consider this paragraph because it said “when a host
> is removed” and my use case in mind was removing all the services but not
> the host.
>
> But, I see now that the Host Description Instruction is mandatory in the
> SRP Update, so that sending any valid SRP Update with a LEASE time of 0
> will always delete all services!
>
> That’s because the host gets deleted by this update and there’s no way to
> not include it.
>
>
>
> So there is no strict requirement to “retransmit its most recent update”
> at all, then. The requestor could just send a single Host instruction with
> lease time 0.
>
> Or include any one or more of its registered services; the effect should
> be the same.   It could even include a non-existing service in its SRP
> Update: even that should work.
>
>
>
> Why not make the SRP Update message as short as possible by not including
> any services – only the host instruction with lease time 0? On 6lowpan mesh
> networks that definitely is helpful.
>
> I tried the OpenThread implementation and it includes all registered
> services in the “delete all” SRP Update which shouldn’t be needed.
>
> Hope I’m not misunderstanding this here – still puzzled by the “most
> recent update” requirement :)
>
>
>
> Esko
>
>
>
> *From:* Ted Lemon <mellon@fugue.com>
> *Sent:* Friday, September 15, 2023 16:41
> *To:* Jonathan Hui <jonhui=40google.com@dmarc.ietf.org>
> *Cc:* Esko Dijk <esko.dijk@iotconsultancy.nl>; dnssd@ietf.org
> *Subject:* Re: [dnssd] SRP: how to remove all published services?
>
>
>
> Oh, except the text you quoted says precisely that, so I think we're okay.
> Thanks, Jonathan. :)
>
>
>
> On Fri, Sep 15, 2023 at 10:40 AM Ted Lemon <mellon@fugue.com> wrote:
>
> Was the question more "what if the requestor sends a partial remove (host
> plus not all services) with lease time zero?" I think the answer is that it
> removes all the services, because the other services are pointing to the
> host, and the host has to be removed; this means that any remaining
> services pointing to that host are simply invalid. We could certainly add a
> note clarifying this point, although it's a bit late in the process for
> that.
>
>
>
> On Fri, Sep 15, 2023 at 10:31 AM Jonathan Hui <jonhui=
> 40google.com@dmarc.ietf.org> wrote:
>
> Hi Esko,
>
>
>
> I believe this is addressed by the immediately following paragraphs in the
> same section? Specifically:
>
>
>
>    To support this, when removing services based on the lease time being
>    zero, an SRP registrar MUST remove all service instances pointing to
>    a host when a host is removed, even if the SRP requestor doesn't list
>    them explicitly.  If the key lease time is nonzero, the SRP registrar
>
>    MUST NOT delete the KEY records for these SRP requestors.
>
>
>
> So there is no need to list all the services that were previously
> registered.
>
>
>
> --
>
> Jonathan Hui
>
>
>
>
>
>
>
> On Fri, Sep 15, 2023 at 7:17 AM Esko Dijk <esko.dijk@iotconsultancy.nl>
> wrote:
>
> A question - in 3.2.5.5.1., Removing all published services, we have:
>
>
>
>    To remove all the services registered to a particular host, the SRP
> requestor retransmits its most recent update with an Update Lease option
> that has a LEASE value of zero.
>
>
>
> I wonder how this exactly works in the following case. If I’ve registered
> service A, and 10 minutes later registered service B in addition (without
> mentioning A in the second SRP Update), then both services A and B are
> actively registered.  Now I send the “most recent SRP Update” which has
> only service B to the SRP registrar, with a LEASE value of zero.
>
> Wouldn’t it be that only service B is removed (lease set to 0) while
> service A stays active?
>
>
>
> If so, we may need to clarify this text I think. Because it’s not always
> the “most recent SRP Update” then.
>
> (If not so, I’m having trouble understanding how the LEASE value in the
> SRP Update does apply to all currently registered services….)
>
>
>
> Esko
>
> _______________________________________________
> dnssd mailing list
> dnssd@ietf.org
> https://www.ietf.org/mailman/listinfo/dnssd
>
> _______________________________________________
> dnssd mailing list
> dnssd@ietf.org
> https://www.ietf.org/mailman/listinfo/dnssd
>
>