Sometimes the ovs has two vxlan-gpe ports,
and one vxlan-gpe port number is null.The
patch avoid to get the null vxlan-gpe port
number.
Change-Id: I02063a7227520b1a55ae11c8b8d87d6ee5f01f80
Signed-off-by: Qiuzheng <rqzcsu123@163.com>
for (Options tpOption : tpOptions) {
// From the VXLAN Tunnels, we want the one with the GPE option set
if (tpOption.key().getOption().equals(OPTION_KEY_EXTS)) {
for (Options tpOption : tpOptions) {
// From the VXLAN Tunnels, we want the one with the GPE option set
if (tpOption.key().getOption().equals(OPTION_KEY_EXTS)) {
- if (tpOption.getValue().equals(OPTION_VALUE_EXTS_GPE)) {
+ if (tpOption.getValue().equals(OPTION_VALUE_EXTS_GPE) && tp.getOfport() != null) {
return Optional.ofNullable(tp.getOfport());
}
}
return Optional.ofNullable(tp.getOfport());
}
}