From owner-freebsd-stable@FreeBSD.ORG Mon Dec 30 15:56:33 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B914F04 for ; Mon, 30 Dec 2013 15:56:33 +0000 (UTC) Received: from mail-wg0-x22e.google.com (mail-wg0-x22e.google.com [IPv6:2a00:1450:400c:c00::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 097A9174B for ; Mon, 30 Dec 2013 15:56:32 +0000 (UTC) Received: by mail-wg0-f46.google.com with SMTP id m15so10092809wgh.25 for ; Mon, 30 Dec 2013 07:56:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=0rPBpKTBPaDMMDd1iJmFK2ro01jBZRR4pxDDC/G10nk=; b=YVH/xV8D0j6e9UJIfsNaTz+kxSs4RGf91QOfGmEHkrY9DQUP+FlqSoAS1+5QiNlLl3 Dor5vTnD8SESkBLaKMSzlCN1djkObA6+x+ZzGhuIeSC9Qk0KuMGldpFz/LgS8vXkVAhR uAJ0vvoswjmKCRzu9x4yGS/QgaAyEutNePczLj0gwEQwLXBLZdOJfGC7/LlMHn1GVQsv AvB7WrB8g4cuMJBzuowEPZuAK4isT6wgXC4Uj4OxBgjyBh8LXNy2JgZZS/S6rP+p8WVB g3yowPkPs1OXCaGR7iwrvIKCkQP0u/JDD10s7UkGygWsc004I6fGOB5xnb0Az4KXoScy CzaA== MIME-Version: 1.0 X-Received: by 10.194.236.199 with SMTP id uw7mr20867033wjc.63.1388418990509; Mon, 30 Dec 2013 07:56:30 -0800 (PST) Received: by 10.217.89.138 with HTTP; Mon, 30 Dec 2013 07:56:30 -0800 (PST) Date: Mon, 30 Dec 2013 17:56:30 +0200 Message-ID: Subject: Fwd: svn commit: r258677 - head/sbin/ipfw From: =?ISO-8859-1?Q?=D6zkan_KIRIK?= To: freebsd-stable Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Dec 2013 15:56:33 -0000 Hi, When this commit will be MFC'ed to stable/10? Thanks, ---------- Forwarded message ---------- From: Alexander V. Chernikov Date: Wed, Nov 27, 2013 at 12:10 PM Subject: svn commit: r258677 - head/sbin/ipfw To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Author: melifaro Date: Wed Nov 27 10:10:25 2013 New Revision: 258677 URL: http://svnweb.freebsd.org/changeset/base/258677 Log: Fix key lookup in ipfw(8) broken since r232865. Print warning for IPv4 address strings which are valid in inet_aton() but not valid in inet_pton(). (1) Found by: =D6zkan KIRIK Submitted by: Ian Smith (1) MFC after: 2 weeks Sponsored by: Yandex LLC Modified: head/sbin/ipfw/ipfw2.c Modified: head/sbin/ipfw/ipfw2.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/ipfw2.c Wed Nov 27 08:39:48 2013 (r258676) +++ head/sbin/ipfw/ipfw2.c Wed Nov 27 10:10:25 2013 (r258677) @@ -4274,13 +4274,24 @@ table_fill_xentry(char *arg, ipfw_table_ addrlen =3D sizeof(struct in6_addr); } else { /* Port or any other key */ - key =3D strtol(arg, &p, 10); /* Skip non-base 10 entries like 'fa1' */ - if (p !=3D arg) { + key =3D strtol(arg, &p, 10); + if (*p =3D=3D '\0') { pkey =3D (uint32_t *)paddr; *pkey =3D htonl(key); type =3D IPFW_TABLE_CIDR; + masklen =3D 32; addrlen =3D sizeof(uint32_t); + } else if ((p !=3D arg) && (*p =3D=3D '.')) { + /* + * Warn on IPv4 address strings + * which are "valid" for inet_aton() but no= t + * in inet_pton(). + * + * Typical examples: '10.5' or '10.0.0.05' + */ + errx(EX_DATAERR, + "Invalid IPv4 address: %s", arg); } } } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"