From nobody Mon Aug 08 14:39:29 2022 X-Original-To: bugs@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 4M1f3k11jnz4Y8pR for ; Mon, 8 Aug 2022 14:39:30 +0000 (UTC) (envelope-from bugzilla-noreply@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 4M1f3j5syGz45KC for ; Mon, 8 Aug 2022 14:39:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4M1f3j4x0Qzw1b for ; Mon, 8 Aug 2022 14:39:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 278EdTsa012734 for ; Mon, 8 Aug 2022 14:39:29 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 278EdTCW012733 for bugs@FreeBSD.org; Mon, 8 Aug 2022 14:39:29 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 265718] ip_fragment() does not call IPSTAT() in one error case Date: Mon, 08 Aug 2022 14:39:29 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: rozhuk.im@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659969569; 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=1JvkUVxCVtt0pJUCg2wamKoi1JcyCR6441j6bqkCsAg=; b=t32rPNp2XbjlDJIjAPyUaxllewoDEJgoaHyRob9KFubU1743c8g0H/uE5RrO3MwD1jMjVH uevlGIp8Kr9pCvnkR53UXd/Z5JJjWtbOZLTce8IWnVTO6FtxEpu57gVd/gF5E+9EwhGMyf FWssYlGKH3tc/ke84du8CYlIgRuHG35+eSDk03RXCysfl1uHXCWklr+z3kPO1Suu+eDJAa +i2CXOF2PCgyvrcI+971Kw2NaxNNQXRNncu25lbe/BO5o1TiuSyqGVEpFJ1pohKgQSvz7O c8KS2+MaRh0MjarBndUoJr/mrsq+aIWhWQ8ElW+1rLWonDWFF/3N8PA2TDx99g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659969569; a=rsa-sha256; cv=none; b=FeRtt3/rbq02P3gX0Gg08Wn+2DqkAgJfCksxQBZUHEu98b7J227pkYtlWJPhS6GPmuiFfN q6gkLVUWl3rjFYS7eEP6xjH5f0Nmu1Qi3OZuqYBAuAsi5eqOsjIpBy9il6JXKrgmgwIll4 I+lB2dVoDgS3D3qOOZNAmlgjKC38c0o4Y7Xuqud4F1xsdSOxgikp/n7FAlcNYbu6p1IhmJ pcvuArzs6Wjl89zBwh0fpd3+G/uT15/eA1S95FlHO19Ev5OOZsZ3ypFhqXYhsQec5I6EBi YXgND2xqa/+tZGLc3Hzu92hhFvfuu56ocCPe/JDRkySJM17z9dCvP/aXm7UUmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265718 Bug ID: 265718 Summary: ip_fragment() does not call IPSTAT() in one error case Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: rozhuk.im@gmail.com sys/netinet/ip_output.c ... int ip_fragment(struct ip *ip, struct mbuf **m_frag, int mtu, u_long if_hwassist_flags) { int error =3D 0; int hlen =3D ip->ip_hl << 2; int len =3D (mtu - hlen) & ~7; /* size of payload in each fragme= nt */ int off; struct mbuf *m0 =3D *m_frag; /* the original packet */ int firstlen; struct mbuf **mnext; int nfrags; uint16_t ip_len, ip_off; ip_len =3D ntohs(ip->ip_len); ip_off =3D ntohs(ip->ip_off); if (ip_off & IP_DF) { /* Fragmentation not allowed */ IPSTAT_INC(ips_cantfrag); return EMSGSIZE; } /* * Must be able to put at least 8 bytes per fragment. */ if (len < 8) return EMSGSIZE; ... In all other error cases IPSTAT_INC() called before exit. Without this stat more time required to debug. --=20 You are receiving this mail because: You are the assignee for the bug.=