From owner-svn-src-head@freebsd.org Thu May 18 04:49:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57511D726F6; Thu, 18 May 2017 04:49:04 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward1m.cmail.yandex.net (forward1m.cmail.yandex.net [IPv6:2a02:6b8:b030::18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD9F81389; Thu, 18 May 2017 04:49:03 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [95.108.130.59]) by forward1m.cmail.yandex.net (Yandex) with ESMTP id 56B62217D3; Thu, 18 May 2017 07:48:51 +0300 (MSK) Received: from smtp1j.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1j.mail.yandex.net (Yandex) with ESMTP id 28EE63C81054; Thu, 18 May 2017 07:48:48 +0300 (MSK) Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Dfc6lwemod-mlsGdKJC; Thu, 18 May 2017 07:48:48 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1495082928; bh=WN0FJk3nR8Nge81XXqA6khwBNM0blrp6zpW5Ky2WJaM=; h=Subject:To:Cc:References:From:Message-ID:Date:In-Reply-To; b=C7xqQ2wk2Y9DjxinKN46dsL1n/X8g37ZDHXqVCLQfg/rGw/A5OWNsb3ozLcJc4vBU gzmyCXURl1eqONFgHB87Ombw9CjdWTDvfwH1NRyKFYzGJ+wrNplkNfOl5+YqeFPPBz C9PgBtLtesYkmOoILj23FCy+huzRgG2rtePEBbZo= Authentication-Results: smtp1j.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-Suid-Status: 1 0,1 0,1 0,1 0 Subject: Re: svn commit: r318400 - head/sbin/ipfw To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201705180049.v4I0nZa1063721@pdx.rh.CN85.dnsmgr.net> From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Message-ID: <72e5d765-dfd5-dd65-b8f1-9d5524cde366@yandex.ru> Date: Thu, 18 May 2017 07:47:03 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 MIME-Version: 1.0 In-Reply-To: <201705180049.v4I0nZa1063721@pdx.rh.CN85.dnsmgr.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="siHLtSsUO8aIvOaXfWLit5o77ESrA96GP" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 04:49:04 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --siHLtSsUO8aIvOaXfWLit5o77ESrA96GP Content-Type: multipart/mixed; boundary="Etn7cfJBTaL5WvR4bGS0ux69lbSX3jEgf"; protected-headers="v1" From: "Andrey V. Elsukov" To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <72e5d765-dfd5-dd65-b8f1-9d5524cde366@yandex.ru> Subject: Re: svn commit: r318400 - head/sbin/ipfw References: <201705180049.v4I0nZa1063721@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201705180049.v4I0nZa1063721@pdx.rh.CN85.dnsmgr.net> --Etn7cfJBTaL5WvR4bGS0ux69lbSX3jEgf Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 18.05.2017 03:49, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] >> Author: ae >> Date: Wed May 17 10:56:22 2017 >> New Revision: 318400 >> URL: https://svnweb.freebsd.org/changeset/base/318400 >> >> Log: >> Allow zero port specification in table entries with type flow. >> =20 >> PR: 217620 >> MFC after: 1 week >> >> Modified: >> head/sbin/ipfw/tables.c >> >> Modified: head/sbin/ipfw/tables.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sbin/ipfw/tables.c Wed May 17 09:04:09 2017 (r318399) >> +++ head/sbin/ipfw/tables.c Wed May 17 10:56:22 2017 (r318400) >> @@ -1260,16 +1260,14 @@ tentry_fill_key_type(char *arg, ipfw_obj >> if ((p =3D strchr(arg, ',')) !=3D NULL) >> *p++ =3D '\0'; >> =20 >> - if ((port =3D htons(strtol(arg, NULL, 10))) =3D=3D 0) { >> + port =3D htons(strtol(arg, &pp, 10)); > ^^^ > Can this be converted to a sizeof(foo) somehow? > Constants like this are typically bad style and lead to bugs. This means that decimal number is expected in the string. Not sure what bugs this can lead to. --=20 WBR, Andrey V. Elsukov --Etn7cfJBTaL5WvR4bGS0ux69lbSX3jEgf-- --siHLtSsUO8aIvOaXfWLit5o77ESrA96GP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAlkdJ0cACgkQAcXqBBDI oXrJmQgAsDjmNc/WgLSIXEYc8jSmWJc9hvHmKVYwITYNUXHPk6EcKTF7fKb6tINv kytgFF7Bd3ZlrkqBrXgXlpdOnNac9ZzUI3UfC3qoqEbrKCWQ624kL54l3RE0w1f9 k2RZBJ+CvL1XLriu03U8PCtCpNyXbl6LCK4IcBb+sPj26TvFqNekdBrS+sp11eSr +g1biZ6ckFHcKn/xqFbOk3V7MbKSTS1tzsGFovEIbctvusi4hTd6wAYH4i5C7J7O sICNA279K1A2YXCAQLvRQjQvl4U/jMEEea6EgLapfCMD25XkjiexmSiVaYoD6piL asy2P8jVeykpw47udjt6zKtOnKntUA== =9dAA -----END PGP SIGNATURE----- --siHLtSsUO8aIvOaXfWLit5o77ESrA96GP--