Re: [Idr] BGP Flowspec rules precedence order (RFC 5575)
Christoph Loibl <c@tix.at> Wed, 14 February 2018 21:41 UTC
Return-Path: <c@tix.at>
X-Original-To: idr@ietfa.amsl.com
Delivered-To: idr@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5546E126C0F for <idr@ietfa.amsl.com>; Wed, 14 Feb 2018 13:41:09 -0800 (PST)
X-Quarantine-ID: <dUHsRmaMhr6o>
X-Virus-Scanned: amavisd-new at amsl.com
X-Amavis-Alert: BAD HEADER SECTION, Non-encoded 8-bit data (char E2 hex): X-Spam-Report: ...tual code (thanks\n\tto Job\342\200\231s comment) th[...]
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, NORMAL_HTTP_TO_IP=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dUHsRmaMhr6o for <idr@ietfa.amsl.com>; Wed, 14 Feb 2018 13:41:06 -0800 (PST)
Received: from mail.hated.at (mail.hated.at [IPv6:2001:858:2:8::235]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 56A0A126B72 for <idr@ietf.org>; Wed, 14 Feb 2018 13:41:06 -0800 (PST)
Received: from 80-110-127-16.cgn.dynamic.surfer.at ([80.110.127.16] helo=[192.168.66.220]) by mail.hated.at with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from <c@tix.at>) id 1em4Ux-00034t-LC; Wed, 14 Feb 2018 22:21:52 +0100
From: Christoph Loibl <c@tix.at>
Message-Id: <372B554B-47F1-49AC-8D66-37A7ED69E57F@tix.at>
Content-Type: multipart/signed; boundary="Apple-Mail=_671D4A96-1B66-4DF6-A92A-EBF83F3AF0CB"; protocol="application/pgp-signature"; micalg="pgp-sha1"
Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\))
Date: Wed, 14 Feb 2018 22:41:00 +0100
In-Reply-To: <CAN-MQG6xnsP28Xn3d7-PECkJrDSk-+QuKZawmAgJs6c-j536=w@mail.gmail.com>
Cc: idr wg <idr@ietf.org>
To: PVLR Pavana Murthy <pvlrpm@gmail.com>
References: <CAN-MQG6xnsP28Xn3d7-PECkJrDSk-+QuKZawmAgJs6c-j536=w@mail.gmail.com>
X-Mailer: Apple Mail (2.3445.5.20)
Archived-At: <https://mailarchive.ietf.org/arch/msg/idr/X9wpVD_j8ZGsXr8UkLjQNSL-yzc>
Subject: Re: [Idr] BGP Flowspec rules precedence order (RFC 5575)
X-BeenThere: idr@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Inter-Domain Routing <idr.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/idr>, <mailto:idr-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/idr/>
List-Post: <mailto:idr@ietf.org>
List-Help: <mailto:idr-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/idr>, <mailto:idr-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 14 Feb 2018 21:41:09 -0000
Hi Pavana, Did you have a look into the actual code (thanks to Job’s comment) that is contained in the RFC5575bis draft which should be identical from the behaviour: https://tools.ietf.org/html/draft-ietf-idr-rfc5575bis-06 <https://tools.ietf.org/html/draft-ietf-idr-rfc5575bis-06> Christoph -- Christoph Loibl c@tix.at | CL8-RIPE | PGP-Key-ID: 0x4B2C0055 | http://www.nextlayer.at > On 12.02.2018, at 12:03, PVLR Pavana Murthy <pvlrpm@gmail.com> wrote: > > Hello, > In the RFC 5575, the following is given for the comparing the Flowspec components of types other then prefix. > > } else { > common = > MIN(component_length(comp1), component_length(comp2)); > cmp = memcmp(data(comp1), data(comp2), common); > // not equal, lowest value has precedence > // equal, longest string has precedence > } > > > Here, what does data refrer to ? > > Is it the binary form of 1) [op, value]> / [op, bitmask] or 2) Just [value] / [bitmask] > > eg: > > > 1) 01 18 58 58 58 04 01 46 81 50 ----> Dst.Prefix: 88.88.88.0/24 <http://88.88.88.0/24> Port: 70 | 80 > > 2) 01 18 58 58 58 04 03 5a c5 6e ----> Dst.Prefix: 88.88.88.0/24 <http://88.88.88.0/24> Port: >=90 & <= 110 > > In the above FS rules, Dst. Prefix is same in both, so we need to compare the data of next type 4 (Port). > So do we need to do memcmp of (01 46 81 50) and (03 5a c5 6e) ? > > Thanks, > Pavana. > > > > _______________________________________________ > Idr mailing list > Idr@ietf.org > https://www.ietf.org/mailman/listinfo/idr
- [Idr] BGP Flowspec rules precedence order (RFC 55… PVLR Pavana Murthy
- Re: [Idr] BGP Flowspec rules precedence order (RF… Christoph Loibl
- Re: [Idr] BGP Flowspec rules precedence order (RF… PVLR Pavana Murthy
- Re: [Idr] BGP Flowspec rules precedence order (RF… Christoph Loibl
- Re: [Idr] BGP Flowspec rules precedence order (RF… PVLR Pavana Murthy