Skip to content

Commit

Permalink
fix null pointer dereference during kube-router --cleanup-config
Browse files Browse the repository at this point in the history
Fixes #79
  • Loading branch information
Murali Reddy committed Jul 27, 2017
1 parent c64b72e commit a86bc44
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/controllers/network_services_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a86bc44

Please sign in to comment.