From nobody Fri Jan 13 21:25:51 2023 X-Original-To: dev-commits-src-all@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 4Ntvbh3VKCz2ql4J; Fri, 13 Jan 2023 21:25:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ntvbh0VWRz449v; Fri, 13 Jan 2023 21:25:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673645152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CONgv4Fwdi8s2eEUBWGjVDkDgEWoLAm8qKomkYH7KrM=; b=mnKfeHNkxoiGOgBht7FdUZuxW302/Ko5InGhVsn60IUGMpNdY+fcNN9pciWU+8rf1isngs RXkbvafjcTxX275VIujTJNjOc2aFUsV38UzIsotdG8MV0b9E5vjfGJejwDIM7SnLVokE8r IH61lvjrDtxkNp8IOU2cYlQPkql1rQ2G/cv0yuWb2t0Bux/ZHuoC1f6ipQ98OXl12Uj50M UbWFKNDIjtnnPWEOh0stoeiNka1qTbTVTT8CC3WecNlMC/L35Kbf3ek/kWXjAIuzNzHqdZ ugDHyOsLGAZx6JRwNTgPEuGPAqI7F4vd2OLzSHg645KjuNclMo7FR5OS+4uyww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673645152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CONgv4Fwdi8s2eEUBWGjVDkDgEWoLAm8qKomkYH7KrM=; b=VRN2axoVeflndZpFr/ySQcnxzoC2EQEZJCsBL5k9/wjxmc5FOZsRSVAzDiHbBShWf7pD4a WyH7I3HNiNkOGU9a/jKhehwCIz+ApQs3dkEsy42izaKHDdMfvJbkQ1PxqqVTs22NTXuRTw 6iLeHHDDvDlJSB/YCiic/FMi9tKPubTv7MD2k2uCN/dH4Fp6BkPzwY8O0/kj0UFM8P0bOr D7+BMEyGEX/ULN5JHLNEa2tC40kf6I058i145h2azA7VRy4jOrLZJISt/OTg25YTFPW3Uy kw8vBKlI+Z6KhyzEwRbKRGfz/JR1EIeGHHIiC6qjzzusA/37q7cMzyGXHTAYqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673645152; a=rsa-sha256; cv=none; b=b/7MADDe4roYXlGJGHajPrGWgFKrPqOfQISYvP0Wsa0XWtyGh8+5M2sz1gzm/78bAKfJ9B 8UlFxuUZ7TcuZ6lml2Pf8Yt3MmtLdmsrbB55tT/Vevwu13wY3g0e7AaFP7RHBhe9B9TRbo +JdsJODAH235QJvk1pTnOKhuvSgGbmqKO64e5fLiixj9AUYH19369nyK8l3TL0L6MMxJhE AklR1q6Eohd89ms2PykB3jceXQrSN0spomq6Nv89Ow4JvVR/XcOETiIdy8l2xEQiGOagCa QNk19P0UnTlDnGrzPyRhVu0KKfORI2+T+WE3Nmu31bR0yfSK/wmUPUMuEvzDKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ntvbg6hZWzMVy; Fri, 13 Jan 2023 21:25:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30DLPpok042440; Fri, 13 Jan 2023 21:25:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30DLPpoS042439; Fri, 13 Jan 2023 21:25:51 GMT (envelope-from git) Date: Fri, 13 Jan 2023 21:25:51 GMT Message-Id: <202301132125.30DLPpoS042439@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 6edb549922e8 - stable/13 - routing: constantify @rc in rib_decompose_notification(). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6edb549922e84ecdf2232670e91cd93265031e04 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=6edb549922e84ecdf2232670e91cd93265031e04 commit 6edb549922e84ecdf2232670e91cd93265031e04 Author: Alexander V. Chernikov AuthorDate: 2022-08-29 18:10:21 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-01-13 21:24:12 +0000 routing: constantify @rc in rib_decompose_notification(). Clarify the @rc immutability by explicitly marking @rc const. MFC after: 2 weeks (cherry picked from commit 177f04d57fbdb1c18ed845e19cc9b902c8b65312) --- sys/net/route/route_ctl.h | 4 ++-- sys/net/route/route_helpers.c | 4 ++-- sys/net/rtsock.c | 4 ++-- sys/netinet6/nd6.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/net/route/route_ctl.h b/sys/net/route/route_ctl.h index e73a6dcf8a93..0b331e5f7d2c 100644 --- a/sys/net/route/route_ctl.h +++ b/sys/net/route/route_ctl.h @@ -82,8 +82,8 @@ int rib_handle_ifaddr_info(uint32_t fibnum, int cmd, struct rt_addrinfo *info); int rib_add_default_route(uint32_t fibnum, int family, struct ifnet *ifp, struct sockaddr *gw, struct rib_cmd_info *rc); -typedef void route_notification_t(struct rib_cmd_info *rc, void *); -void rib_decompose_notification(struct rib_cmd_info *rc, +typedef void route_notification_t(const struct rib_cmd_info *rc, void *); +void rib_decompose_notification(const struct rib_cmd_info *rc, route_notification_t *cb, void *cbdata); int rib_add_redirect(u_int fibnum, struct sockaddr *dst, diff --git a/sys/net/route/route_helpers.c b/sys/net/route/route_helpers.c index fe503db368ce..465e0de81882 100644 --- a/sys/net/route/route_helpers.c +++ b/sys/net/route/route_helpers.c @@ -292,7 +292,7 @@ notify_del(struct rib_cmd_info *rc, const struct weightened_nhop *wn_src, } static void -decompose_change_notification(struct rib_cmd_info *rc, route_notification_t *cb, +decompose_change_notification(const struct rib_cmd_info *rc, route_notification_t *cb, void *cbdata) { uint32_t num_old, num_new; @@ -379,7 +379,7 @@ decompose_change_notification(struct rib_cmd_info *rc, route_notification_t *cb, * Assumes at least one of the nexthops in @rc is multipath. */ void -rib_decompose_notification(struct rib_cmd_info *rc, route_notification_t *cb, +rib_decompose_notification(const struct rib_cmd_info *rc, route_notification_t *cb, void *cbdata) { const struct weightened_nhop *wn; diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 0a5a58ad3c05..f5b8019e9942 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1011,7 +1011,7 @@ update_rtm_from_rc(struct rt_addrinfo *info, struct rt_msghdr **prtm, #ifdef ROUTE_MPATH static void -save_del_notification(struct rib_cmd_info *rc, void *_cbdata) +save_del_notification(const struct rib_cmd_info *rc, void *_cbdata) { struct rib_cmd_info *rc_new = (struct rib_cmd_info *)_cbdata; @@ -1020,7 +1020,7 @@ save_del_notification(struct rib_cmd_info *rc, void *_cbdata) } static void -save_add_notification(struct rib_cmd_info *rc, void *_cbdata) +save_add_notification(const struct rib_cmd_info *rc, void *_cbdata) { struct rib_cmd_info *rc_new = (struct rib_cmd_info *)_cbdata; diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 751511170439..924727d598de 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1591,7 +1591,7 @@ nd6_free_redirect(const struct llentry *ln) * Updates status of the default router route. */ static void -check_release_defrouter(struct rib_cmd_info *rc, void *_cbdata) +check_release_defrouter(const struct rib_cmd_info *rc, void *_cbdata) { struct nd_defrouter *dr; struct nhop_object *nh;