Cleanup iptables after bridge network is removed#591
Conversation
|
Sorry for the late, I'm still on vacation and have only limited Internet visit, and this situation will suppose to last another 3 days. |
dee34e0 to
63b147d
Compare
|
Just rebased, let me know what do you think of this change :) |
|
Thanks @WeiZhang555 . Will take a look at it shortly. |
|
It has been a while since last update, how's this going? Any suggestion on this? 😄 ping @mavenugo |
There was a problem hiding this comment.
You don't need to define a defer function here and no err == nil check. You only need to register the cleanup function unconditionally, because there is no further code which sets the err variable
There was a problem hiding this comment.
Unless the execution order of the cleanup function is important. If that is the case, then the last defer is needed as it will assure we cleanup in reverse order what we configured.
There was a problem hiding this comment.
Yes, you are right. I'll remove the defer, and defer on line 71 seems unnecessary too, I'll remove it together.
63b147d to
af7d6cd
Compare
|
Thanks for your detailed and patient suggestion @aboch , I have made some changes per your suggestion, please take a look. 😄 |
Fixed moby#570 Clean unused iptables rules after bridge network is removed Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
af7d6cd to
e60b8e4
Compare
|
@aboch can you please wrap up your review on this one ? |
|
LGTM. |
|
Thanks @WeiZhang555 for the fix and taking care of comments. LGTM |
Cleanup iptables after bridge network is removed
|
I'm always happy to help 😄 |
Fixed #570
Clean unused iptables rules after bridge network is removed
Signed-off-by: Zhang Wei zhangwei555@huawei.com