route-table: If device is not there, route is still parseable.
authorThadeu Lima de Souza Cascardo <cascardo@redhat.com>
Thu, 26 May 2016 20:34:58 +0000 (17:34 -0300)
committerBen Pfaff <blp@ovn.org>
Fri, 3 Jun 2016 19:57:33 +0000 (12:57 -0700)
Do not return failure to parse a route if device has been removed before we are
able to parse the route. That prevents "received bad netlink message" warnings
on the log.

This can be reproduced by simply removing interfaces.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
lib/route-table.c

index 2d095dc..d837d98 100644 (file)
@@ -252,7 +252,11 @@ route_table_parse(struct ofpbuf *buf, struct route_table_msg *change)
 
                 VLOG_DBG_RL(&rl, "Could not find interface name[%u]: %s",
                             rta_oif, ovs_strerror(error));
-                return false;
+                if (error == ENXIO) {
+                    change->relevant = false;
+                } else {
+                    return false;
+                }
             }
         }