提交 64919d97 编写于 作者: J John Ferlan

Check for existence of interface prior to setting terminate flag

https://bugzilla.redhat.com/show_bug.cgi?id=903480

During domain destruction it's possible that the learnIPAddressThread has
already removed the interface prior to the teardown filter path being run.
The teardown code would only be telling the thread to terminate.
上级 2f3e7f1e
......@@ -251,6 +251,14 @@ virNWFilterTerminateLearnReq(const char *ifname) {
int ifindex;
virNWFilterIPAddrLearnReqPtr req;
/* It's possible that it's already been removed as a result of
* virNWFilterDeregisterLearnReq during learnIPAddressThread() exit
*/
if (virNetDevExists(ifname) != 1) {
virResetLastError();
return 0;
}
if (virNetDevGetIndex(ifname, &ifindex) < 0) {
virResetLastError();
return rc;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册