algo: Fix NPE if ClassType is not specified 10/99410/1
authorOlivier Dugeon <olivier.dugeon@orange.com>
Tue, 23 Nov 2021 16:38:22 +0000 (17:38 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 20 Jan 2022 17:49:22 +0000 (18:49 +0100)
commitf7bf3e0045d2aa13844741974277ee392fd21c3c
treec38f887be0cb41ba830e97b6c73c48c3759cc152
parent653122ce82d725a911ef17739ea947474567293a
algo: Fix NPE if ClassType is not specified

Path computation algorithms failed during edge pruning if ClassType
is not specified raising a NPE.

In addition, setting ClassType to 0 by default ito handle the NPE is
not conform to RFC5455.

This patch modify edge pruning when ClassType is not specified (set
to 0) and remove default setting to avoid problem when enforcing LSP
with a ClassType equal 0.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Change-Id: I8930393359960dc9406fb9cc112bc194049cb35a
(cherry picked from commit 42282fe0eac1a45e0afdedd55c4984195ceddb8d)
algo/algo-impl/src/main/java/org/opendaylight/algo/impl/AbstractPathComputation.java
pcep/server/server-provider/src/main/java/org/opendaylight/bgpcep/pcep/server/provider/MessagesUtil.java
pcep/server/server-provider/src/main/java/org/opendaylight/bgpcep/pcep/server/provider/PathComputationImpl.java