azure-container-networking
azure-container-networking copied to clipboard
CNS Possibly Not Handling Error Correctly and Possibly Not Releasing IP Address
I have not observed this however while reading the code, I noticed this as a possible condition that may not release the ip address.
https://github.com/Azure/azure-container-networking/blob/a2a2ab89b94e68245f29118ce9c450517b8cee01/cns/fsnotify/fsnotify.go#L60
If os.Open(..) returns an error, we log however continue. io.ReadAll(...) returns an invalid argument error and continues (but logs error). The .Close function handles the nil condition and continues.
podInterfaceID := string(data) is just an empty string and assuming what ever was supposed to happen on line https://github.com/Azure/azure-container-networking/blob/a2a2ab89b94e68245f29118ce9c450517b8cee01/cns/fsnotify/fsnotify.go#L73 is not happening?
Note: I didn't do a full analysis however the function looks suspect.