Skip to content

Commit

Permalink
Merge pull request #167 from River-sh/bugfix/panic_calculate_ipset
Browse files Browse the repository at this point in the history
Bugfix/panic calculate ipset
  • Loading branch information
BSWANG authored Mar 26, 2024
2 parents 12c4711 + fa158b9 commit a826b83
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/networkengine/routedriver/vxlan/vxlan.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,11 @@ func (vx *vxlan) calIPSetOnNode(network *types.Network) map[string]*netlink.IPSe
continue
}
for _, srcCIDR := range nodeInfo.Subnets {
_, ipNet, _ := net.ParseCIDR(srcCIDR)
_, ipNet, err := net.ParseCIDR(srcCIDR)
if err != nil {
klog.Errorf("parse node subnet %s error %s", srcCIDR, err.Error())
continue
}
ones, _ := ipNet.Mask.Size()
entry := &netlink.IPSetEntry{
IP: ipNet.IP,
Expand Down

0 comments on commit a826b83

Please sign in to comment.