[ovs-dev] [PATCH] dpif-netlink-rtnl: Fix false errors on interfaces without tunnel config

Roi Dayan roid at mellanox.com
Thu Jul 27 11:40:02 UTC 2017


When we skip adding a port using rtnetlink and not because of an error we
need to return EOPNOTSUPP to avoid logging an error message.

Fixes: 2fd3d5eda508 ("dpif-netlink-rtnl: Support layer3 GRE")
Signed-off-by: Roi Dayan <roid at mellanox.com>
Reviewed-by: Paul Blakey <paulb at mellanox.com>
---
 lib/dpif-netlink-rtnl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/dpif-netlink-rtnl.c b/lib/dpif-netlink-rtnl.c
index 98a2f2b..3efa1f6 100644
--- a/lib/dpif-netlink-rtnl.c
+++ b/lib/dpif-netlink-rtnl.c
@@ -349,7 +349,7 @@ dpif_netlink_rtnl_port_create(struct netdev *netdev)
     type = netdev_to_ovs_vport_type(netdev_get_type(netdev));
     tnl_cfg = netdev_get_tunnel_config(netdev);
     if (!tnl_cfg) {
-        return EINVAL;
+        return EOPNOTSUPP;
     }
 
     kind = vport_type_to_kind(type, tnl_cfg);
-- 
2.7.4



More information about the dev mailing list