From nobody Wed Aug 31 11:07:55 2022 X-Original-To: net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MHhH242KJz4b33Y for ; Wed, 31 Aug 2022 11:07:58 +0000 (UTC) (envelope-from mls.ietf@gmail.com) Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MHhH12Lq4z4CZr for ; Wed, 31 Aug 2022 11:07:57 +0000 (UTC) (envelope-from mls.ietf@gmail.com) Received: by mail-ed1-x52e.google.com with SMTP id b44so17856266edf.9 for ; Wed, 31 Aug 2022 04:07:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date; bh=YMZ2CFEJHDa8zCnUYD6JdzpgGN3GhptBhlXH49HA2+4=; b=T/mwTFPmaDh55WqH6/H//Omw6/zQAvncZ84JsEcF8qQvihS8cfvmLSz+DzjyVfqMbU Q93A9wUwPxjiWAagjICXXXyGXLA/Y7khusjvv2uFBxuSr+mM3UPpb/3CAy+rjYdIZWBv dCi2bLzD+Irb9O2s8LbwU4D/TjgwtCEezCpK6no6qvRWAqTUKx7J9lWRY9aWjRMD8CrC Xluga4NU/J/iuAG6TNlseH6Xa+OLj4dOFQGAa+ihqCFXo5L3prcchUkawyPfJvoTggTd uvPyWR91jxnVtZHEaEj3g87MfddRAbMzZPTowXZQxa4xD4gnhVqf6Tj44IhE7w3FTwQg plWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=YMZ2CFEJHDa8zCnUYD6JdzpgGN3GhptBhlXH49HA2+4=; b=F9nYPqF8vOr//xq8W5lR0OH42mI2AlkvDh0ESGirKWxthrByWOao9ehCuklNGU/76P Bezvo+tQVj+k/r9gD72jAXMmucWR5zCxCjyWdN68RyxHnBWXuOeJL133I20VPlaX5qXp WMO2xYRdk9obyM57o25Lbxrz4UZH7JaXYRMYDm2kvEcFCP50mHymaCE9y2/RAaZbSGUl TkZhcHk6GJJZUJlMDHi+ZvPzz+BUtF34kgG1npG9DdqKtFNcahOvx+tLiPaoh9atcbf/ 3aDvZ7ohnOiWVh4X3ZiLj2MCZV4WRgCAx5ICwjZalJBRduw3ETMzEChXYGl6eowad78I 15Cw== X-Gm-Message-State: ACgBeo3lAUAEzZ/UBpdOcu8Qdf2MTIl4ADJoFNQ7AM7GWTMWdf0ffbS8 B/WfthC6rAOc49mfMtyORfoAqTXtS5Y= X-Google-Smtp-Source: AA6agR7WxuSiTw6LMJY1HjMBVgfsf0MUtODDF0HgoAJBLRMqgd8NkCM03Smldve47klMAxUtLHJqyQ== X-Received: by 2002:a05:6402:10cc:b0:446:491f:d6dd with SMTP id p12-20020a05640210cc00b00446491fd6ddmr24086039edu.360.1661944076057; Wed, 31 Aug 2022 04:07:56 -0700 (PDT) Received: from smtpclient.apple (p200300c9d7208a00e8c74b674fcd717a.dip0.t-ipconnect.de. [2003:c9:d720:8a00:e8c7:4b67:4fcd:717a]) by smtp.gmail.com with ESMTPSA id k21-20020a17090632d500b007419b73bb8dsm3687729ejk.10.2022.08.31.04.07.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Aug 2022 04:07:55 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: Notification of change of IP address/Routing etc From: Martin Stiemerling In-Reply-To: <260F641E-8D90-42B0-87C0-E7F62BAAB481@ipfw.ru> Date: Wed, 31 Aug 2022 13:07:55 +0200 Cc: "net@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <62095FB9-A72E-4621-92CD-DA52E23CF009@gmail.com> References: <67E19935-B868-4BFB-A9FF-9CD9A5547343@gmail.com> <431B2046-B986-441D-97E8-BA7EDF0420A4@gmail.com> <260F641E-8D90-42B0-87C0-E7F62BAAB481@ipfw.ru> To: "Alexander V. Chernikov" X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4MHhH12Lq4z4CZr X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b="T/mwTFPm"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mls.ietf@gmail.com designates 2a00:1450:4864:20::52e as permitted sender) smtp.mailfrom=mls.ietf@gmail.com X-Spamd-Result: default: False [-3.42 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.997]; NEURAL_HAM_MEDIUM(-0.92)[-0.922]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_DN_EQ_ADDR_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[net@freebsd.org]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TAGGED_FROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::52e:from]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[net@freebsd.org] X-ThisMailContainsUnwantedMimeParts: N > Am 31.08.2022 um 12:09 schrieb Alexander V. Chernikov = : >=20 >=20 >=20 >> On 31 Aug 2022, at 10:11, Martin Stiemerling = wrote: >>=20 >> Hi,=20 >>=20 >>> Am 31.08.2022 um 11:00 schrieb Peter Jeremy : >>>=20 >>> On 2022-Aug-31 10:18:44 +0200, Martin Stiemerling = wrote: >>>> I am looking for a mechanism to get a notification from the OS = when, for instance, an IP address on an interface or a routing entry is = being changed.=20 >>>=20 >>> Assuming you are using the base OS version of dhclient, you could = use >>> /etc/dhclient-exit-hooks, which is a shellscript documented in >>> dhclient-script(8). >>=20 >> Thanks, but that won=E2=80=99t help, as I need notifications about = all changes, even if the change is not happening thru dhcp. E.g., IPv6 = changes or manual changes.=20 >>=20 >> This is for a gnmi-target, i.e., net management via yang/gnmi, under = development for Linux and FreeBSD for routers, firewalls, software = switches etc: >> https://code.fbi.h-da.de/danet/gnmi-target >>=20 >> I have seen that there is a project for adding netlink to FreeBSD14: = https://github.com/pengnam/freebsd-netlink >>=20 >> Right now, I haven=E2=80=99t found a way, devd is for device changes = only, to get this done.=20 > For now, you can use routing socket notifications (route(4)). > "route -n monitor=E2=80=9D provide a quick way to check what=E2=80=99s = available at the moment. Great & thanks a lot! >=20 > There are some plans to have netlink in 14 and 13 but the timeframe is = not settled yet. Ok, I will look forward to this.=20 >>=20 >> I am happy to help to change this, but it is unclear to me where and = how to start.=20 >>=20 >> Thanks, >>=20 >> Martin=20 >>=20 >>=20 >>=20 >>=20 >=20