Skip to content

Commit fb5aac8

Browse files
committed
fix potential empty eni
1 parent 2c14a95 commit fb5aac8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

daemon/eni-multi-ip.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func (f *eniIPFactory) getEnis(ctx *AllocCtx) ([]*ENI, error) {
175175
eniIPLog.Infof("adjusted vswitch slice: %+v, original eni slice: %s", vSwitches, func(enis []*ENI) string {
176176
var vsw []string
177177
for i := 0; i < len(enis); i++ {
178-
if enis[i] == nil {
178+
if enis[i] == nil || enis[i].ENI == nil {
179179
continue
180180
}
181181
vsw = append(vsw, enis[i].VSwitchID)

0 commit comments

Comments
 (0)