Skip to content

Commit

Permalink
Merge pull request #928 from eeeeeta/fix-generate-fwmark
Browse files Browse the repository at this point in the history
fix unintentional Sprint of two-argument generateFwmark() call
  • Loading branch information
aauren authored Jun 14, 2020
2 parents a23017d + a2ac2f0 commit 309c803
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/controllers/proxy/service_endpoints_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,12 @@ func (nsc *NetworkServicesController) setupExternalIPServices(serviceInfoMap ser
externalIpServiceId = generateIpPortId(externalIP, svc.protocol, strconv.Itoa(svc.port))

// ensure there is NO iptables mangle table rule to FWMARK the packet
fwMark := fmt.Sprint(generateFwmark(externalIP, svc.protocol, strconv.Itoa(svc.port)))
fwmark, err := generateFwmark(externalIP, svc.protocol, strconv.Itoa(svc.port))
if err != nil {
glog.Errorf("Failed to generate a fwmark due to " + err.Error())
continue
}
fwMark := fmt.Sprint(fwmark)
err = nsc.ln.cleanupMangleTableRule(externalIP, svc.protocol, strconv.Itoa(svc.port), fwMark)
if err != nil {
glog.Errorf("Failed to verify and cleanup any mangle table rule to FMWARD the traffic to external IP due to " + err.Error())
Expand Down

0 comments on commit 309c803

Please sign in to comment.