Commit 3cc413f
committed
error: revert mapping EHOSTUNREACH/ENETDOWN
Earlier commits
- 45449e0 ('Add EHOSTUNREACH to nl_syserr2nlerr')
- fe74608 ('Add ENETDOWN to nl_syserr2nlerr')
introduced NLE_HOSTUNREACH and NLE_NETDOWN. So now failures with those
error codes would no longer return NLE_FAILURE. This is a desirable
change (in principle), but also an API break.
As it causes problems ([1]), gut the change for now. We keep the error
defines (and the assigned NLE error numbers), but we no longer map the
errno.h codes, which in practice reverts those two changes.
This is only an intermediate solution, to revert the break. We should
bring this change back, but somehow "better". It's not clear how exactly
we can improve the API without breaking it. For example, we could
identify a few old functions which must stick to the old behavior, while
new functions get the new error codes. Or maybe better, selected
functions should guarantee that when a function returns NLE_FAILURE that
errno is set to a value that is relevant to the underlying. failure.
[1] #433 (comment)1 parent 3e65a4f commit 3cc413f
1 file changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
111 | 124 | | |
112 | 125 | | |
113 | 126 | | |
| |||
0 commit comments