algo: Fix NPE if ClassType is not specified 42/98742/3
authorOlivier Dugeon <olivier.dugeon@orange.com>
Tue, 23 Nov 2021 16:38:22 +0000 (17:38 +0100)
committerRobert Varga <nite@hq.sk>
Thu, 20 Jan 2022 10:56:14 +0000 (10:56 +0000)
commit42282fe0eac1a45e0afdedd55c4984195ceddb8d
treedaf07e1e4e737cf4ef96ac1f29e9380b26182c25
parentce192cfa41fb1437f601c68f89d0939da5d6fd23
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
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