Commit 1639ec8
committed
fix: check on wrong return value in addr_init
`addr_init` calls `inet_pton`, which returns 0 when the supplied does
string does not represent a valid network address in the specified
address family.
We were checking for -1 instead of 0, missing this error case.
Due to that error, the sensor accepts any value in the socket output
configuration, even invalid ip address, and blocks instead of reporting
an error. git reset --soft HEAD~11 parent 7d73506 commit 1639ec8
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
0 commit comments