The netviet sfc classifier get null vxlan-gpe port 23/73423/3
authorQiuzheng <rqzcsu123@163.com>
Tue, 26 Jun 2018 06:17:46 +0000 (14:17 +0800)
committerSam Hague <shague@redhat.com>
Sat, 30 Jun 2018 02:19:53 +0000 (02:19 +0000)
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>
sfc/classifier/impl/src/main/java/org/opendaylight/netvirt/sfc/classifier/providers/GeniusProvider.java

index 1645f4a219ddc4db6dafbce367ccbf018bed34b2..144b7f677dd8a92ee587556c3cc784719fe1cb44 100644 (file)
@@ -276,7 +276,7 @@ public class GeniusProvider {
                 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());
                         }
                     }