inet: Add Missing Gateway Parameter to Host Route Deletion Interfaces
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest9 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | service: Refactor 'nameserver_del_routes'.src/ | +26 | 0 replies | |
| 2/9 | service: Add gateway parameter to DNS host route deletion paths.src/ src/ src/ | +30 | 0 replies | |
| 3/9 | inet: Add gateway parameter to 'connman_inet_del_{,ipv6_}host_route'.include/ src/ src/ +1 more | +77 | 0 replies | |
| 4/9 | inet: Document 'connman_inet_{add,del}_{,ipv6_}host_route'.src/ | +144 | 0 replies | |
| 5/9 | service: Const-qualify 'add_nameserver_route'.src/ | +1 | 0 replies | |
| 6/9 | service: Add 'DBG' to 'add_nameserver_route'.src/ | +3 | 0 replies | |
| 7/9 | inet: Document '{add,del}_nameserver_route'.src/ | +53 | 0 replies | |
| 8/9 | inet: Document 'nameserver_{add,del}_routes'.src/ | +50 | 0 replies | |
| 9/9 | inet: Document '__connman_service_nameserver_{add,del}_routes'.src/ | +44 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/9] inet: Add Missing Gateway Parameter to Host Route Deletion Interfaces
Routing table manipulation, host routes among them, should be fundamentally symmetric. The routing table entry parameters used to add a route should be identical to those used to delete the same route. Otherwise, an 'ESRCH' error may occur which, at present, are suppressed due to commit e03a01d3182d ("inet: Fix error handling when adding/removing routes") that is masking route deletion errors where this gateway parameter asymmetry is occurring.
This adds a previously-missing gateway address parameter to the 'connman_inet_del_{,ipv6_}host_route' functions. In addition, call sites to 'connman_inet_del_{,ipv6_}host_route' are updated to pass the gateway parameter.
In addition, in the process, this refactors 'nameserver_del_routes' into a second, helper function 'del_nameserver_route' such that host route deletion is separated from DNS server iteration. This structure now mirrors that of 'nameserver_add_routes' and 'add_nameserver_route' since, again, route addition and deletion should be symmetric.
NOTE: This is only the first half of the necessary change. The second half is revising the actual implementation of 'connman_inet_del_{,ipv6_}host_route' to take advantage of the newly-added gateway parameter. Implementation notes in each of 'connman_inet_del_{,ipv6_}host_route' have been added toward that end.
Grant Erickson (9):
service: Refactor 'nameserver_del_routes'.
service: Add gateway parameter to DNS host route deletion paths.
inet: Add gateway parameter to 'connman_inet_del_{,ipv6_}host_route'.
inet: Document 'connman_inet_{add,del}_{,ipv6_}host_route'.
service: Const-qualify 'add_nameserver_route'.
service: Add 'DBG' to 'add_nameserver_route'.
inet: Document '{add,del}_nameserver_route'.
inet: Document 'nameserver_{add,del}_routes'.
inet: Document '__connman_service_nameserver_{add,del}_routes'.
include/inet.h | 17 ++-- src/connman.h | 1 + src/gateway.c | 33 +++++--- src/inet.c | 184 ++++++++++++++++++++++++++++++++++++++-- src/service.c | 225 ++++++++++++++++++++++++++++++++++++++++++++----- 5 files changed, 419 insertions(+), 41 deletions(-)
Signature · 1 line
2.42.0