mirror of
https://github.com/cloudnativelabs/kube-router.git
synced 2025-10-07 16:01:08 +02:00
fix null pointer dereference during kube-router --cleanup-config
Fixes #79
This commit is contained in:
parent
c64b72e4a3
commit
a86bc44ecc
@ -767,7 +767,14 @@ func getKubeDummyInterface() (netlink.Link, error) {
|
||||
func (nsc *NetworkServicesController) Cleanup() {
|
||||
// cleanup ipvs rules by flush
|
||||
glog.Infof("Cleaning up IPVS configuration permanently")
|
||||
err := h.Flush()
|
||||
|
||||
handle, err := libipvs.New()
|
||||
if err != nil {
|
||||
glog.Errorf("Failed to cleanup ipvs rules: ", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
err = handle.Flush()
|
||||
if err != nil {
|
||||
glog.Errorf("Failed to cleanup ipvs rules: ", err.Error())
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user