Unverified Commit d31059ef by Christian Brauner Committed by GitHub

Merge pull request #3278 from tomponline/tp-proxy-sleep

network: Adds short sleep between veth setup and neighbour proxy add
parents e901a7a1 954e36b4
...@@ -375,6 +375,13 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd ...@@ -375,6 +375,13 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd
} }
if (netdev->priv.veth_attr.mode == VETH_MODE_ROUTER) { if (netdev->priv.veth_attr.mode == VETH_MODE_ROUTER) {
/* sleep for a short period of time to work around a bug that intermittently prevents IP neighbour
proxy entries from being added using lxc_ip_neigh_proxy below. When the issue occurs the entries
appear to be added successfully but then do not appear in the proxy list. The length of time
slept doesn't appear to be important, only that the process sleeps for a short period of time.
*/
nanosleep((const struct timespec[]){{0, 1000}}, NULL);
if (netdev->ipv4_gateway) { if (netdev->ipv4_gateway) {
char bufinet4[INET_ADDRSTRLEN]; char bufinet4[INET_ADDRSTRLEN];
if (!inet_ntop(AF_INET, netdev->ipv4_gateway, bufinet4, sizeof(bufinet4))) { if (!inet_ntop(AF_INET, netdev->ipv4_gateway, bufinet4, sizeof(bufinet4))) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment