draft-ietf-idr-rfc5575bis-05.txt   draft-ietf-idr-rfc5575bis-06.txt 
IDR Working Group S. Hares IDR Working Group S. Hares
Internet-Draft Huawei Internet-Draft Huawei
Obsoletes: 5575,7674 (if approved) C. Loibl Obsoletes: 5575,7674 (if approved) C. Loibl
Intended status: Standards Track Next Layer Communications Intended status: Standards Track Next Layer Communications
Expires: April 22, 2018 R. Raszuk Expires: April 27, 2018 R. Raszuk
Bloomberg LP Bloomberg LP
D. McPherson D. McPherson
Verisign Verisign
M. Bacher M. Bacher
T-Mobile Austria T-Mobile Austria
October 19, 2017 October 24, 2017
Dissemination of Flow Specification Rules Dissemination of Flow Specification Rules
draft-ietf-idr-rfc5575bis-05 draft-ietf-idr-rfc5575bis-06
Abstract Abstract
This document updates [RFC5575] which defines a Border Gateway This document updates [RFC5575] which defines a Border Gateway
Protocol Network Layer Reachability Information (BGP NLRI) encoding Protocol Network Layer Reachability Information (BGP NLRI) encoding
format that can be used to distribute traffic Flow Specifications. format that can be used to distribute traffic Flow Specifications.
This allows the routing system to propagate information regarding This allows the routing system to propagate information regarding
more specific components of the traffic aggregate defined by an IP more specific components of the traffic aggregate defined by an IP
destination prefix. destination prefix.
skipping to change at page 2, line 20 skipping to change at page 2, line 20
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on April 22, 2018. This Internet-Draft will expire on April 27, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 15, line 22 skipping to change at page 15, line 22
For all other component types, unless otherwise specified, the For all other component types, unless otherwise specified, the
comparison is performed by comparing the component data as a binary comparison is performed by comparing the component data as a binary
string using the memcmp() function as defined by the ISO C standard. string using the memcmp() function as defined by the ISO C standard.
For strings with equal lengths the lowest string (memcmp) has higher For strings with equal lengths the lowest string (memcmp) has higher
precedence. For strings of different lengths, the common prefix is precedence. For strings of different lengths, the common prefix is
compared. If the common prefix is not equal the string with the compared. If the common prefix is not equal the string with the
lowest prefix has higher precedence. If the common prefix is equal, lowest prefix has higher precedence. If the common prefix is equal,
the longest string is considered to have higher precedence than the the longest string is considered to have higher precedence than the
shorter one. shorter one.
The code below shows a python3 implementation of the comparison The code below shows a Python3 implementation of the comparison
algorithm described above. The full python3 implementation including algorithm. The full code was tested with Python 3.6.3 and can be
unittests can be optained at https://github.com/stoffi92/flowspec-cmp obtained at https://github.com/stoffi92/flowspec-cmp [1].
[1].
import itertools import itertools
import ipaddress import ipaddress
def flow_rule_cmp(a, b): def flow_rule_cmp(a, b):
for comp_a, comp_b in itertools.zip_longest(a.components, for comp_a, comp_b in itertools.zip_longest(a.components,
b.components): b.components):
# If a component type does not exist in one rule # If a component type does not exist in one rule
# this rule has lower precedence # this rule has lower precedence
if not comp_a: if not comp_a:
 End of changes. 5 change blocks. 
8 lines changed or deleted 7 lines changed or added

This html diff was produced by rfcdiff 1.46. The latest version is available from http://tools.ietf.org/tools/rfcdiff/