github-vet / github-vet/rangeloop-pointer-findings
projectcalico/vpp-dataplane: vpp-manager/vpp_runner.go; 11 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [projectcalico/vpp-dataplane](https://www.github.com/projectcalico/vpp-dataplane) at [vpp-manager/vpp_runner.go](https://github.com/projectcalico/vpp-dataplane/blob/8fd73fd99f6b149d79d12f8d5d062f6903e26ba5/vpp-manager/vpp_runner.go#L179-L189)
Below is the message reported by the analyzer for this snippet of code. Beware that the analyzer only reports the first
issue it finds, so please do not limit your consideration to the contents of the below message.
> reference to serviceCIDR was used in a composite literal at line 183
[Click here to see the code in its original context.](https://github.com/projectcalico/vpp-dataplane/blob/8fd73fd99f6b149d79d12f8d5d062f6903e26ba5/vpp-manager/vpp_runner.go#L179-L189)
Click here to show the 11 line(s) of Go which triggered the analyzer.
```go
for _, serviceCIDR := range v.params.ServiceCIDRs {
// Add a route for the service prefix through VPP
log.Infof("Adding route to service prefix %s through VPP", serviceCIDR.String())
err = netlink.RouteAdd(&netlink.Route{
Dst: &serviceCIDR,
LinkIndex: link.Attrs().Index,
})
if err != nil {
return errors.Wrapf(err, "cannot add tun route to service %s", serviceCIDR.String())
}
}
```
Leave a reaction on this issue to contribute to the project by classifying this instance as a **Bug** :-1:, **Mitigated** :+1:, or **Desirable Behavior** :rocket:
See the descriptions of the classifications [here](https://github.com/github-vet/rangeclosure-findings#how-can-i-help) for more information.
commit ID: 8fd73fd99f6b149d79d12f8d5d062f6903e26ba5
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.