coreos / go-iptables

Go wrapper around iptables utility
Apache License 2.0
1.14k stars 257 forks source link

iptables IsNotExist robustness #71

Closed aojea closed 4 years ago

aojea commented 4 years ago

iptables appends sometimes more logs to the error message. The function err.IsNotExist fails when it does't match the exact string. We make the function more robust matching for the substring inside the error message.

xref: https://github.com/containernetworking/plugins/pull/421#issuecomment-565005419

aojea commented 4 years ago

@squeed please take a look

https://github.com/containernetworking/plugins/pull/421#issuecomment-565005419

squeed commented 4 years ago

makes sense.