From: Roy Marples Date: Tue, 8 Oct 2019 11:17:22 +0000 (+0100) Subject: route: Don't log error when adding a route which already exists X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63b5ebfb89e9dccef7c6f5b5a7032165332f311f;p=thirdparty%2Fdhcpcd.git route: Don't log error when adding a route which already exists Add a comment to explain why. --- diff --git a/src/route.c b/src/route.c index 01bf8df9..a9d97102 100644 --- a/src/route.c +++ b/src/route.c @@ -594,7 +594,9 @@ rt_add(rb_tree_t *kroutes, struct rt *nrt, struct rt *ort) } #endif - if (if_route(RTM_ADD, nrt) != -1) { + /* Shouldn't need to check for EEXIST, but some kernels don't + * dump the subnet route just after we added the address. */ + if (if_route(RTM_ADD, nrt) != -1 || errno == EEXIST) { result = true; goto out; }