From e6e426b931275b7f35b317bd67566239c9fc1a55 Mon Sep 17 00:00:00 2001 From: "Claudio D. Gasparini" Date: Mon, 13 Jun 2016 16:42:29 +0200 Subject: [PATCH] BUG-5024: Update BGP LS to conform RFC 7752 changes introduced + Update Igp flag + Code point reassignment for RSVP-Te and SR + new protcol-id OSPFv3 defined Change-Id: I34e32564133598e4db95bb976380f250d6816092 Signed-off-by: Claudio D. Gasparini --- .../attribute/PrefixAttributesParser.java | 20 ++++- .../linkstate/nlri/LinkstateNlriParser.java | 4 +- .../src/main/yang/bgp-linkstate.yang | 80 ++++++++++++------- .../src/main/yang/bgp-segment-routing.yang | 32 ++++---- .../LinkstateAttributeParserTest.java | 10 ++- .../linkstate/LinkstateNlriParserTest.java | 2 +- .../provider/LinkstateTopologyBuilder.java | 7 +- 7 files changed, 96 insertions(+), 59 deletions(-) diff --git a/bgp/linkstate/src/main/java/org/opendaylight/protocol/bgp/linkstate/attribute/PrefixAttributesParser.java b/bgp/linkstate/src/main/java/org/opendaylight/protocol/bgp/linkstate/attribute/PrefixAttributesParser.java index a451ba65f7..3250f3c3d2 100644 --- a/bgp/linkstate/src/main/java/org/opendaylight/protocol/bgp/linkstate/attribute/PrefixAttributesParser.java +++ b/bgp/linkstate/src/main/java/org/opendaylight/protocol/bgp/linkstate/attribute/PrefixAttributesParser.java @@ -33,6 +33,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.link import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev150210.linkstate.path.attribute.link.state.attribute.PrefixAttributesCaseBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev150210.linkstate.path.attribute.link.state.attribute.prefix.attributes._case.PrefixAttributes; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev150210.linkstate.path.attribute.link.state.attribute.prefix.attributes._case.PrefixAttributesBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev150210.prefix.state.IgpBits; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev150210.prefix.state.IgpBitsBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev150210.prefix.state.SrBindingSidLabels; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev150210.prefix.state.SrPrefix; @@ -55,6 +56,9 @@ public final class PrefixAttributesParser { private static final int FLAGS_SIZE = 8; private static final int UP_DOWN_BIT = 0; + private static final int OSPF_NO_UNICAST = 1; + private static final int OSPF_LOCAL_ADDRESS = 2; + private static final int OSPF_PROPAGATE_ADDRESS = 3; /* Prefix Attribute TLVs */ private static final int IGP_FLAGS = 1152; @@ -97,7 +101,15 @@ public final class PrefixAttributesParser { case IGP_FLAGS: final BitArray flags = BitArray.valueOf(value, FLAGS_SIZE); final boolean upDownBit = flags.get(UP_DOWN_BIT); - builder.setIgpBits(new IgpBitsBuilder().setUpDown(new UpDown(upDownBit)).build()); + final boolean ospfNoUnicast = flags.get(OSPF_NO_UNICAST); + final boolean ospfLocalAddress = flags.get(OSPF_LOCAL_ADDRESS); + final boolean ospfPropagateAddress = flags.get(OSPF_PROPAGATE_ADDRESS); + builder.setIgpBits(new IgpBitsBuilder().setUpDown(new UpDown(upDownBit)) + .setIsIsUpDown(upDownBit) + .setOspfNoUnicast(ospfNoUnicast) + .setOspfLocalAddress(ospfLocalAddress) + .setOspfPropagateNssa(ospfPropagateAddress) + .build()); LOG.debug("Parsed IGP flag (up/down bit) : {}", upDownBit); break; case ROUTE_TAG: @@ -182,7 +194,11 @@ public final class PrefixAttributesParser { final PrefixAttributes prefixAtrributes = prefixAttributesCase.getPrefixAttributes(); if (prefixAtrributes.getIgpBits() != null) { final BitArray igpBit = new BitArray(FLAGS_SIZE); - igpBit.set(UP_DOWN_BIT, prefixAtrributes.getIgpBits().getUpDown().isUpDown()); + final IgpBits igpBits = prefixAtrributes.getIgpBits(); + igpBit.set(UP_DOWN_BIT, igpBits.getUpDown().isUpDown() || igpBits.isIsIsUpDown()); + igpBit.set(OSPF_NO_UNICAST, igpBits.isOspfNoUnicast()); + igpBit.set(OSPF_LOCAL_ADDRESS, igpBits.isOspfLocalAddress()); + igpBit.set(OSPF_PROPAGATE_ADDRESS, igpBits.isOspfPropagateNssa()); TlvUtil.writeTLV(IGP_FLAGS, Unpooled.wrappedBuffer(igpBit.array()), byteAggregator); } serializeRouteTags(prefixAtrributes.getRouteTags(), byteAggregator); diff --git a/bgp/linkstate/src/main/java/org/opendaylight/protocol/bgp/linkstate/nlri/LinkstateNlriParser.java b/bgp/linkstate/src/main/java/org/opendaylight/protocol/bgp/linkstate/nlri/LinkstateNlriParser.java index 61a3d4c57c..8281d91406 100644 --- a/bgp/linkstate/src/main/java/org/opendaylight/protocol/bgp/linkstate/nlri/LinkstateNlriParser.java +++ b/bgp/linkstate/src/main/java/org/opendaylight/protocol/bgp/linkstate/nlri/LinkstateNlriParser.java @@ -231,8 +231,6 @@ public final class LinkstateNlriParser implements NlriParser, NlriSerializer { // FIXME : use codec private static int domProtocolIdValue(final String protocolId) { switch (protocolId) { - case "unknown": - return ProtocolId.Unknown.getIntValue(); case "isis-level1": return ProtocolId.IsisLevel1.getIntValue(); case "isis-level2": @@ -243,6 +241,8 @@ public final class LinkstateNlriParser implements NlriParser, NlriSerializer { return ProtocolId.Direct.getIntValue(); case "static": return ProtocolId.Static.getIntValue(); + case "ospf-v3": + return ProtocolId.OspfV3.getIntValue(); case "rsvp-te": return ProtocolId.RsvpTe.getIntValue(); case "bgp-epe": diff --git a/bgp/linkstate/src/main/yang/bgp-linkstate.yang b/bgp/linkstate/src/main/yang/bgp-linkstate.yang index 95de2318bd..3260ac4297 100644 --- a/bgp/linkstate/src/main/yang/bgp-linkstate.yang +++ b/bgp/linkstate/src/main/yang/bgp-linkstate.yang @@ -46,19 +46,19 @@ module bgp-linkstate { } identity linkstate-address-family { - reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2"; + reference "https://tools.ietf.org/html/rfc7752#section-3.2"; base bgp-t:address-family; } identity linkstate-subsequent-address-family { - reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2"; + reference "https://tools.ietf.org/html/rfc7752#section-3.2"; base bgp-t:subsequent-address-family; } typedef nlri-type { - reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2"; + reference "https://tools.ietf.org/html/rfc7752#section-3.2"; type enumeration { enum node { value 1; @@ -73,10 +73,12 @@ module bgp-linkstate { value 4; } enum ipv4-te-lsp { + status deprecated; reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03#section-4.1"; value 5; } enum ipv6-te-lsp { + status deprecated; reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03#section-4.1"; value 6; } @@ -84,11 +86,8 @@ module bgp-linkstate { } typedef protocol-id { - reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2"; + reference "https://tools.ietf.org/html/rfc7752#section-3.2"; type enumeration { - enum unknown { - value 0; - } enum isis-level1 { value 1; } @@ -104,23 +103,28 @@ module bgp-linkstate { enum static { value 5; } - enum rsvp-te { - reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03#section-2.1"; + enum ospf-v3 { value 6; } enum bgp-epe { - reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-00#section-4"; + reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-05#section-4"; value 7; } + enum rsvp-te { + status deprecated; + reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03#section-2.1"; + value 8; // rsvp-te protocol-id TBD by IANA + } enum segment-routing { + status deprecated; reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03#section-2.1"; - value 8; // segment-routing protocol-id TBD by IANA + value 9; // segment-routing protocol-id TBD by IANA } } } typedef ospf-route-type { - reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.3.1"; + reference "https://tools.ietf.org/html/rfc7752#section-3.2.3.1"; type enumeration { enum intra-area { value 1; @@ -152,12 +156,12 @@ module bgp-linkstate { } typedef domain-identifier { - reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4"; + reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4"; type uint32; } typedef area-identifier { - reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4"; + reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4"; type uint32; } @@ -172,12 +176,12 @@ module bgp-linkstate { } typedef ospf-interface-identifier { - reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4"; + reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4"; type uint32; } typedef topology-identifier { - reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.5"; + reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.5"; type uint16 { range "0..4095"; } @@ -185,7 +189,7 @@ module bgp-linkstate { grouping isis-router-identifier { - reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4"; + reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4"; leaf iso-system-id { type netc:iso-system-identifier; mandatory true; @@ -193,7 +197,7 @@ module bgp-linkstate { } grouping isis-lan-identifier { - reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4"; + reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4"; container is-is-router-identifier { uses isis-router-identifier; } @@ -206,7 +210,7 @@ module bgp-linkstate { } grouping ospf-router-identifier { - reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4"; + reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4"; leaf ospf-router-id { type uint32; mandatory true; @@ -214,7 +218,7 @@ module bgp-linkstate { } grouping ospf-v2-lan-identifier { - reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4"; + reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4"; uses ospf-router-identifier; leaf ipv4-address { type ipv4-interface-identifier; @@ -223,7 +227,7 @@ module bgp-linkstate { } grouping ospf-v3-lan-identifier { - reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4"; + reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4"; uses ospf-router-identifier; leaf lan-interface { type ospf-interface-identifier; @@ -280,7 +284,7 @@ module bgp-linkstate { type topology-identifier; } leaf ospf-route-type { - when "../../protocol-id = 'ospf'"; + when "../../protocol-id[ .='ospf' or .='ospf-v3' ]"; type ospf-route-type; } leaf ip-reachability-information { @@ -402,7 +406,7 @@ module bgp-linkstate { } typedef node-flag-bits { - reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.1"; + reference "https://tools.ietf.org/html/rfc7752#section-3.3.1.1"; type bits { bit overload { position 0; @@ -426,24 +430,24 @@ module bgp-linkstate { } typedef isis-area-identifier { - reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.2"; + reference "https://tools.ietf.org/html/rfc7752#section-3.3.1.2"; type binary { length "1..20"; } } typedef ipv4-router-identifier { - reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.4"; + reference "https://tools.ietf.org/html/rfc7752#section-3.3.1.4"; type inet:ipv4-address; } typedef ipv6-router-identifier { - reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.4"; + reference "https://tools.ietf.org/html/rfc7752#section-3.3.1.4"; type inet:ipv6-address; } grouping node-state { - reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1"; + reference "https://tools.ietf.org/html/rfc7752#section-3.3.1"; leaf-list topology-identifier { type topology-identifier; } @@ -591,28 +595,43 @@ module bgp-linkstate { } typedef route-tag { - reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.3.2"; + reference "https://tools.ietf.org/html/rfc7752#section-3.3.3.2"; + description "Carries original IGP TAGs of the prefix."; type binary { length "4"; } } typedef extended-route-tag { - reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.3.3"; + reference "https://tools.ietf.org/html/rfc7752#section-3.3.3.3"; + description "Carries IS-IS Extended Route Tags of the prefix."; type binary { length "8"; } } grouping igp-bits { - reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.3.1"; + reference "https://tools.ietf.org/html/rfc7752#section-3.3.3.1"; leaf up-down { + status deprecated; type bits { bit up-down { position 0; } } } + leaf is-is-up-down { + type boolean; + } + leaf ospf-no-unicast { + type boolean; + } + leaf ospf-local-address { + type boolean; + } + leaf ospf-propagate-nssa { + type boolean; + } } grouping prefix-state { @@ -663,6 +682,7 @@ module bgp-linkstate { } } case te-lsp-attributes-case { + status deprecated; description "LSP Object"; reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03#section-2.2"; container te-lsp-attributes { diff --git a/bgp/linkstate/src/main/yang/bgp-segment-routing.yang b/bgp/linkstate/src/main/yang/bgp-segment-routing.yang index db23530fcf..223a4fbc6f 100644 --- a/bgp/linkstate/src/main/yang/bgp-segment-routing.yang +++ b/bgp/linkstate/src/main/yang/bgp-segment-routing.yang @@ -11,7 +11,7 @@ module bgp-segment-routing { description "This module contains the base data concepts contained - in draft-gredler-idr-bgp-ls-segment-routing-ext-00. + in draft-gredler-idr-bgp-ls-segment-routing-ext-02. Copyright (c)2015 Cisco Systems, Inc. All rights reserved. @@ -26,7 +26,7 @@ module bgp-segment-routing { } typedef algorithm { - reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-00#section-2.1.2"; + reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-02#section-2.1.2"; type enumeration { enum shortest-path-first { value 0; @@ -38,12 +38,12 @@ module bgp-segment-routing { } typedef weight { - reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-00#section-2.2"; + reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-02#section-2.2"; type uint8; } grouping sid-label-index { - reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-00#section-2.3.4.2"; + reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-02#section-2.3.4"; choice sid-label-index { case local-label-case { leaf local-label { @@ -64,7 +64,7 @@ module bgp-segment-routing { } grouping sr-capabilities-tlv { - reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-00#section-2.1.1"; + reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-02#section-2.1.1"; leaf mpls-ipv4 { type boolean; } @@ -89,7 +89,7 @@ module bgp-segment-routing { } grouping ospf-adj-flags { - reference "https://tools.ietf.org/html/draft-ietf-ospf-segment-routing-extensions-05#section-7.1"; + reference "https://tools.ietf.org/html/draft-ietf-ospf-segment-routing-extensions-08#section-7.1"; leaf backup { type boolean; } @@ -104,7 +104,7 @@ module bgp-segment-routing { uses ospf-adj-flags; } case isis-adj-flags-case { - reference "https://tools.ietf.org/html/draft-ietf-isis-segment-routing-extensions-05#section-2.2.1"; + reference "https://tools.ietf.org/html/draft-ietf-isis-segment-routing-extensions-06#section-2.2.1"; uses ospf-adj-flags; leaf address-family { type boolean; @@ -114,7 +114,7 @@ module bgp-segment-routing { } grouping adj-sid-tlv { - reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-00#section-2.2.1"; + reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-02#section-2.2.1"; uses adj-flags; leaf weight { type weight; @@ -123,7 +123,7 @@ module bgp-segment-routing { } grouping lan-adj-sid-tlv { - reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-00#section-2.2.2"; + reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-02#section-2.2.2"; uses adj-flags; leaf weight { type weight; @@ -147,10 +147,10 @@ module bgp-segment-routing { } grouping prefix-sid-tlv { - reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-00#section-2.3.1"; + reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-02#section-2.3.1"; choice flags { case isis-prefix-flags-case { - reference "https://tools.ietf.org/html/draft-ietf-ospf-segment-routing-extensions-05#section-5"; + reference "https://tools.ietf.org/html/draft-ietf-ospf-segment-routing-extensions-08#section-5"; uses prefix-flags; leaf readvertisement { type boolean; @@ -213,7 +213,7 @@ module bgp-segment-routing { } grouping binding-sub-tlvs { - reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-00#section-2.3.4"; + reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-02#section-2.3.4"; choice binding-sub-tlv { case prefix-sid-case { uses prefix-sid-tlv; @@ -251,7 +251,7 @@ module bgp-segment-routing { } grouping isis-binding-flags { - reference "https://tools.ietf.org/html/draft-ietf-isis-segment-routing-extensions-05#section-2.4"; + reference "https://tools.ietf.org/html/draft-ietf-isis-segment-routing-extensions-06#section-2.4"; leaf address-family { type boolean; } @@ -270,14 +270,14 @@ module bgp-segment-routing { } grouping ospf-binding-flags { - reference "https://tools.ietf.org/html/draft-ietf-ospf-segment-routing-extensions-05#section-6"; + reference "https://tools.ietf.org/html/draft-ietf-ospf-segment-routing-extensions-08#section-6"; leaf mirroring { type boolean; } } grouping binding-sid-tlv { - reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-00#section-2.3.3"; + reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-02#section-2.3.3"; leaf weight { type weight; } @@ -312,7 +312,7 @@ module bgp-segment-routing { } grouping range-tlv { - reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-00#section-2.3.2"; + reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-02#section-2.3.2"; leaf inter-area { type boolean; } diff --git a/bgp/linkstate/src/test/java/org/opendaylight/protocol/bgp/linkstate/LinkstateAttributeParserTest.java b/bgp/linkstate/src/test/java/org/opendaylight/protocol/bgp/linkstate/LinkstateAttributeParserTest.java index 7dd33aee3d..ebf2b5093f 100644 --- a/bgp/linkstate/src/test/java/org/opendaylight/protocol/bgp/linkstate/LinkstateAttributeParserTest.java +++ b/bgp/linkstate/src/test/java/org/opendaylight/protocol/bgp/linkstate/LinkstateAttributeParserTest.java @@ -57,6 +57,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.link import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev150210.linkstate.path.attribute.link.state.attribute.node.attributes._case.NodeAttributes; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev150210.linkstate.path.attribute.link.state.attribute.prefix.attributes._case.PrefixAttributes; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev150210.linkstate.path.attribute.link.state.attribute.te.lsp.attributes._case.TeLspAttributes; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev150210.prefix.state.IgpBits; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev150210.update.attributes.mp.reach.nlri.advertized.routes.destination.type.DestinationLinkstateCaseBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev150210.update.attributes.mp.reach.nlri.advertized.routes.destination.type.destination.linkstate._case.DestinationLinkstateBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev130919.path.attributes.AttributesBuilder; @@ -124,7 +125,7 @@ public class LinkstateAttributeParserTest { 4, 0x0b, 0, 2, 0, 1 // sr-algorythms }; - private static final byte[] P4_ATTR = { 0x04, (byte) 0x80, 0, 0x01, (byte) 0x80, 0x04, (byte) 0x81, 0, 0x08, 0x12, 0x34, 0x56, 0x78, + private static final byte[] P4_ATTR = { 0x04, (byte) 0x80, 0, 0x01, (byte) 0xF0, 0x04, (byte) 0x81, 0, 0x08, 0x12, 0x34, 0x56, 0x78, 0x10, 0x30, 0x50, 0x70, 0x04, (byte) 0x82, 0, 0x08, 0x12, 0x34, 0x56, 0x78, 0x10, 0x30, 0x50, 0x70, 0x04, (byte) 0x83, 0, 0x04, 0, 0, 0, 0x0a, 0x04, (byte) 0x84, 0, 0x04, 0x0a, 0x19, 0x02, 0x1b, 4, (byte)0x86, 0,8, (byte)0xf0, 0, 0,0, 1,2,3,4, // prefix-sid tlv @@ -292,7 +293,12 @@ public class LinkstateAttributeParserTest { assertFalse(ls.getSrRange().isInterArea()); assertEquals(1, ls.getSrRange().getSubTlvs().size()); assertNotNull(ls.getSrBindingSidLabels()); - assertTrue(ls.getIgpBits().getUpDown().isUpDown()); + final IgpBits ispBits = ls.getIgpBits(); + assertTrue(ispBits.getUpDown().isUpDown()); + assertTrue(ispBits.isIsIsUpDown()); + assertTrue(ispBits.isOspfNoUnicast()); + assertTrue(ispBits.isOspfLocalAddress()); + assertTrue(ispBits.isOspfPropagateNssa()); assertEquals(2, ls.getRouteTags().size()); assertArrayEquals(new byte[] { (byte) 0x12, (byte) 0x34, (byte) 0x56, (byte) 0x78 }, ls.getRouteTags().get(0).getValue()); assertEquals(1, ls.getExtendedTags().size()); diff --git a/bgp/linkstate/src/test/java/org/opendaylight/protocol/bgp/linkstate/LinkstateNlriParserTest.java b/bgp/linkstate/src/test/java/org/opendaylight/protocol/bgp/linkstate/LinkstateNlriParserTest.java index 099a08b2ec..3f166a7583 100644 --- a/bgp/linkstate/src/test/java/org/opendaylight/protocol/bgp/linkstate/LinkstateNlriParserTest.java +++ b/bgp/linkstate/src/test/java/org/opendaylight/protocol/bgp/linkstate/LinkstateNlriParserTest.java @@ -132,7 +132,7 @@ public class LinkstateNlriParserTest { private final byte[] teLspNlri = new byte[] { (byte) 0x00, (byte) 0x05, //NLRI Type Te-IPV4 (byte) 0x00, (byte) 0x12, // length - (byte) 0x06, //Protocol-ID + (byte) 0x08, //Protocol-ID (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x01, // Identifier (byte) 0x01, (byte) 0x02, (byte) 0x03, (byte) 0x04, //IPv4 Tunnel Sender Address (byte) 0x00, (byte) 0x01, //Tunnel ID diff --git a/bgp/topology-provider/src/main/java/org/opendaylight/bgpcep/bgp/topology/provider/LinkstateTopologyBuilder.java b/bgp/topology-provider/src/main/java/org/opendaylight/bgpcep/bgp/topology/provider/LinkstateTopologyBuilder.java index edeeed2c78..e0d345ac9e 100755 --- a/bgp/topology-provider/src/main/java/org/opendaylight/bgpcep/bgp/topology/provider/LinkstateTopologyBuilder.java +++ b/bgp/topology-provider/src/main/java/org/opendaylight/bgpcep/bgp/topology/provider/LinkstateTopologyBuilder.java @@ -493,14 +493,13 @@ public final class LinkstateTopologyBuilder extends AbstractTopologyBuilder