Skip to content

Commit a826b83

Browse files
authored
Merge pull request #167 from River-sh/bugfix/panic_calculate_ipset
Bugfix/panic calculate ipset
2 parents 12c4711 + fa158b9 commit a826b83

File tree

1 file changed

+5
-1
lines changed
  • pkg/networkengine/routedriver/vxlan

1 file changed

+5
-1
lines changed

pkg/networkengine/routedriver/vxlan/vxlan.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,11 @@ func (vx *vxlan) calIPSetOnNode(network *types.Network) map[string]*netlink.IPSe
454454
continue
455455
}
456456
for _, srcCIDR := range nodeInfo.Subnets {
457-
_, ipNet, _ := net.ParseCIDR(srcCIDR)
457+
_, ipNet, err := net.ParseCIDR(srcCIDR)
458+
if err != nil {
459+
klog.Errorf("parse node subnet %s error %s", srcCIDR, err.Error())
460+
continue
461+
}
458462
ones, _ := ipNet.Mask.Size()
459463
entry := &netlink.IPSetEntry{
460464
IP: ipNet.IP,

0 commit comments

Comments
 (0)