mbox series

[0/5] Address Unhandled Gateway Route Lifecycle Events/Transitions

Message ID 20231220055613.2287074-1-gerickson@nuovations.com (mailing list archive)
Headers show
Series Address Unhandled Gateway Route Lifecycle Events/Transitions | expand

Message

Grant Erickson Dec. 20, 2023, 5:56 a.m. UTC
There were a number of "escapes" or unhandled events and transitions
that did not adhere to the documented gateway configuration lifecycle
/ state machine.

Failure to handle these was resulting in duplicate default routes, no
default routes, and incorrect default route priorities for some
services and their underlying network interfaces.

These "escapes" were handled in three primary ways with this patch series:

  1. Leveraging '__connman_inet_rtnl_recv' in 'iproute_default_modify'.
  2. Leveraging -ESRCH returned by 'iproute_default_modify'.
  3. Adding explicit conditional cases for the "escapes" not otherwise
     covered by (1) and (2).

Grant Erickson (5):
  inet: Use '__connman_inet_rtnl_recv' for RTNL default route
    transaction.
  gateway: Handle -ESRCH in 'unset_default_gateway_route_common'.
  gateway: Address unhandled gateway lifecycle events/transitions.
  gateway: Add and leveage 'gateway_config_set_{,in}active'.
  gateway: Expand the @param documentation for
    'yield_default_gateway{,_for_type}'.

 src/gateway.c | 80 +++++++++++++++++++++++++++++++++++++++------------
 src/inet.c    |  6 ++++
 2 files changed, 68 insertions(+), 18 deletions(-)

Comments

Marcel Holtmann Dec. 23, 2023, 12:22 p.m. UTC | #1
Hi Grant,


> There were a number of "escapes" or unhandled events and transitions
> that did not adhere to the documented gateway configuration lifecycle
> / state machine.
> 
> Failure to handle these was resulting in duplicate default routes, no
> default routes, and incorrect default route priorities for some
> services and their underlying network interfaces.
> 
> These "escapes" were handled in three primary ways with this patch series:
> 
>  1. Leveraging '__connman_inet_rtnl_recv' in 'iproute_default_modify'.
>  2. Leveraging -ESRCH returned by 'iproute_default_modify'.
>  3. Adding explicit conditional cases for the "escapes" not otherwise
>     covered by (1) and (2).
> 
> Grant Erickson (5):
>  inet: Use '__connman_inet_rtnl_recv' for RTNL default route
>    transaction.
>  gateway: Handle -ESRCH in 'unset_default_gateway_route_common'.
>  gateway: Address unhandled gateway lifecycle events/transitions.
>  gateway: Add and leveage 'gateway_config_set_{,in}active'.
>  gateway: Expand the @param documentation for
>    'yield_default_gateway{,_for_type}'.
> 
> src/gateway.c | 80 +++++++++++++++++++++++++++++++++++++++------------
> src/inet.c    |  6 ++++
> 2 files changed, 68 insertions(+), 18 deletions(-)

all 5 patches have been applied.

Regards

Marcel