From owner-freebsd-bugs@FreeBSD.ORG Tue May 13 10:00:02 2014 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4249C24D for ; Tue, 13 May 2014 10:00:02 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3061B2413 for ; Tue, 13 May 2014 10:00:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s4DA01xt033022 for ; Tue, 13 May 2014 10:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4DA01ts033021; Tue, 13 May 2014 10:00:01 GMT (envelope-from gnats) Date: Tue, 13 May 2014 10:00:01 GMT Message-Id: <201405131000.s4DA01ts033021@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Dennis Yusupoff Subject: Re: bin/189471: ipfw table regression Reply-To: Dennis Yusupoff X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 10:00:02 -0000 The following reply was made to PR bin/189471; it has been noted by GNATS. From: Dennis Yusupoff To: bycn82 , bug-followup@FreeBSD.org Cc: Subject: Re: bin/189471: ipfw table regression Date: Tue, 13 May 2014 13:58:11 +0400 This is a multi-part message in MIME format. --------------060309080704020200020902 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit OK, I will try. I think it's a time to add "helper" argument to *ipfw table add* command so that you could set data type explicity, is it IPv6 or IPv4. Something like that: ipfw table XX add beef.de ipv6 ipfw table XX add beef.de ipv4 AFAIK, it greatly reduce complexity of programming attempt to guess what kind of input data user meant. 13.05.2014 10:45, bycn82 ?????: > developers are still working on it, so > > 1. you can get the latest source which already fixed this issue. > > 2. or just comment out the whole else trunk as below > } else { > /* Port or any other key */ > key = strtol(arg, &p, 10); > /* Skip non-base 10 entries like 'fa1' */ > if (p != arg) { > pkey = (uint32_t *)paddr; > *pkey = htonl(key); > type = IPFW_TABLE_CIDR; > addrlen = sizeof(uint32_t); > } > } > > 3. or only comment out this line in the else trunk > type = IPFW_TABLE_CIDR; > > > Can the developer help to explain what kind of data you want to > support in the table? -- Best regards, Dennis Yusupoff, network engineer of Smart-Telecom ISP Russia, Saint-Petersburg --------------060309080704020200020902 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit OK, I will try.

I think it's a time to add "helper" argument to *ipfw table add* command so that you could set data type explicity, is it IPv6 or IPv4. Something like that:

ipfw table XX add beef.de ipv6
ipfw table XX add beef.de ipv4

AFAIK, it greatly reduce complexity of programming attempt to guess what kind of input data user meant.

13.05.2014 10:45, bycn82 пишет:
developers are still working on it, so

1.    you can get the latest source which already fixed this issue.

2.    or just comment out the whole else trunk as below
        } else {
            /* Port or any other key */
            key = strtol(arg, &p, 10);
            /* Skip non-base 10 entries like 'fa1' */
            if (p != arg) {
                pkey = (uint32_t *)paddr;
                *pkey = htonl(key);
                type = IPFW_TABLE_CIDR;
                addrlen = sizeof(uint32_t);
            }
        }

3.    or only comment out this  line in the else trunk
    type = IPFW_TABLE_CIDR;


Can the developer help to explain what kind of data you want to support in the table?

-- 
 Best regards,
 Dennis Yusupoff,
 network engineer of
 Smart-Telecom ISP
 Russia, Saint-Petersburg 
--------------060309080704020200020902--