Skip to content

Commit ef9a3f8

Browse files
authored
Merge pull request #29 from crosbymichael/prefix
Use network count in ifname index
2 parents 5882530 + 6aeaa2d commit ef9a3f8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

opts.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,11 @@ func WithConfListFile(fileName string) CNIOpt {
136136
if err != nil {
137137
return err
138138
}
139+
i := len(c.networks)
139140
c.networks = append(c.networks, &Network{
140141
cni: c.cniConfig,
141142
config: confList,
142-
ifName: getIfName(c.prefix, 0),
143+
ifName: getIfName(c.prefix, i),
143144
})
144145
return nil
145146
}

0 commit comments

Comments
 (0)