]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network/neighbor: skip requesting neighbor if it is already requested
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 2 Sep 2024 04:03:09 +0000 (13:03 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 2 Sep 2024 05:12:37 +0000 (14:12 +0900)
src/network/networkd-neighbor.c

index 6b81950f96c6323fadf0663461daf394b166f851..3377bb056e5899a93049dfd74d40e390ea6f26c7 100644 (file)
@@ -343,6 +343,9 @@ static int link_request_neighbor(Link *link, const Neighbor *neighbor) {
                 return 0;
         }
 
+        if (neighbor_get_request(link, neighbor, NULL) >= 0)
+                return 0; /* already requested, skipping. */
+
         r = neighbor_dup(neighbor, &tmp);
         if (r < 0)
                 return r;