From nobody Wed May 17 10:05:30 2023 X-Original-To: dev-commits-src-branches@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 4QLpdR1wRPz49w0H; Wed, 17 May 2023 10:05:31 +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 4QLpdR0tL4z43d6; Wed, 17 May 2023 10:05:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684317931; 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=wzVHSBZckoOifXMSolCYuLkJPnz694K1K0DBc4CCYKA=; b=DPZQ3P92kY84kh8VKi40PWAXjzBpGJc/cE4KiK7yvLdjTRBdiAM+5QdL/xo3I9I2P17get UlfJ93ZZ91jT/+fLPhD9fTsQsu+WTZSYflVQ0kYwF5Mqr12E6SEs3I8DQLFD13ssKGEO+y NSmuPu78+FoX8xM7hPtJzyJBfv9ztYG+DE0vZvw6FzGqtm7Rs+SH4epMU9TGd/UcXv2hcz QmjMdQTh4KXhPQ6J45ZjWHd0f4tCDY/XuAjWtg4gIsVPZSusSIwAVBuqSFnUowIg7Dmkye ge5p+Z1ADoZ3fmtfTj0GnSM95SuF71u/e4elW9Fe7iAIJNvpRYgG8EcFN+yp1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684317931; 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=wzVHSBZckoOifXMSolCYuLkJPnz694K1K0DBc4CCYKA=; b=Pw0oLrAVZtWjoqFji4/rmOJAXks6CyheKV76j8NKPzqhhF6Z1fG/c6RqXovz3EUi92vCDF emmnv43/ukQ3pwLhXtFLgPhwCvn/8WjdVmmLolMSLdI0myqU7IEKcEOVe8sv4gyeinnabG 0nGDSUctC4oyEvGu+lvlbjAhlLKhrzgqdbeC+GgfSZmk8Qc7+F+8qBHo2wAAMWJC5U73KH 1bVawhnfYxEZXCmDYAWeGOfQrKuinG/Zj1vWYNrWe1j/e1VItfwpPPpRx42qaIl0D8Qtyw Npa5NqF5OUANNheufDJSzz0IGdOivaDDPjtipp85R3XmjF3zvYzAMko5K9jLfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684317931; a=rsa-sha256; cv=none; b=XP+R+1TG7AUjB/IbhzK0c807xvR17PhF62Uc4HbaMuEE89+7FC2+1KPLqPUqw6PHqrWoZx CNPK8vaPyjC4K5YhojKlc/EHycycBRp+iAqRBDYxLTKWs/C867oj+T8C5/YpOZdPfkgzMF bJj7PRiJhBJfx3kADLGCY0kbQ15V9+mwUE1b2LaCxaTAdEokfJbSUJf2KYncteEW4L9XoH of7IgFu+gU3nsJbdpmNBuKNLBHiec4A4BzTiFKruAQnwSeqD2GOnEoWDdzGV1NvDSzni3S rOSC4iSo7dWYQWW9M+452MA3yPjU4Dv7pm3PQeEs9NetFlbRWGFigkocDWeu4g== 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 4QLpdQ739vz10Gg; Wed, 17 May 2023 10:05:30 +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 34HA5Uun056886; Wed, 17 May 2023 10:05:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34HA5UVk056885; Wed, 17 May 2023 10:05:30 GMT (envelope-from git) Date: Wed, 17 May 2023 10:05:30 GMT Message-Id: <202305171005.34HA5UVk056885@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 1ff44a05d6bc - stable/12 - if_stf: Delete unreachable code List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 1ff44a05d6bc9ada7ee9691c3a52f6a60438d0b5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=1ff44a05d6bc9ada7ee9691c3a52f6a60438d0b5 commit 1ff44a05d6bc9ada7ee9691c3a52f6a60438d0b5 Author: Zhenlei Huang AuthorDate: 2023-04-23 04:47:57 +0000 Commit: Zhenlei Huang CommitDate: 2023-05-17 10:02:12 +0000 if_stf: Delete unreachable code As the flag M_WAITOK is passed to ip_encap_attach(), then the function will never return NULL, and the following code within NULL check branch will be unreachable. No functional change intended. Reviewed by: kp Fixes: 6d8fdfa9d5e7d Rework IP encapsulation handling code MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39746 (cherry picked from commit c373e1d6adbc3785e8f1072cdc4a062733baa514) (cherry picked from commit f70caf1b4524c10d3a747770c69da9d7b6a56a22) --- sys/net/if_stf.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c index 098099052264..bdba588d2522 100644 --- a/sys/net/if_stf.c +++ b/sys/net/if_stf.c @@ -247,12 +247,6 @@ stf_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) ifp->if_dunit = IF_DUNIT_NONE; sc->encap_cookie = ip_encap_attach(&ipv4_encap_cfg, sc, M_WAITOK); - if (sc->encap_cookie == NULL) { - if_printf(ifp, "attach failed\n"); - free(sc, M_STF); - ifc_free_unit(ifc, unit); - return (ENOMEM); - } ifp->if_mtu = IPV6_MMTU; ifp->if_ioctl = stf_ioctl;