platform: always set the lock flag for RTO_MIN
The rto-min value is ignored by kernel unless the lock flag is set.
This commit is contained in:
@@ -4291,7 +4291,7 @@ rta_multipath_done:
|
||||
initrwnd = nla_get_u32(mtb[RTAX_INITRWND]);
|
||||
if (mtb[RTAX_MTU])
|
||||
mtu = nla_get_u32(mtb[RTAX_MTU]);
|
||||
if (mtb[RTAX_RTO_MIN]) {
|
||||
if (mtb[RTAX_RTO_MIN] && NM_FLAGS_HAS(lock, 1U << RTAX_RTO_MIN)) {
|
||||
rto_min = nla_get_u32(mtb[RTAX_RTO_MIN]);
|
||||
rto_min_set = TRUE;
|
||||
}
|
||||
@@ -5638,12 +5638,19 @@ nla_put_failure:
|
||||
static guint32
|
||||
ip_route_get_lock_flag(const NMPlatformIPRoute *route)
|
||||
{
|
||||
return (((guint32) route->lock_window) << RTAX_WINDOW)
|
||||
| (((guint32) route->lock_cwnd) << RTAX_CWND)
|
||||
| (((guint32) route->lock_initcwnd) << RTAX_INITCWND)
|
||||
| (((guint32) route->lock_initrwnd) << RTAX_INITRWND)
|
||||
| (((guint32) route->lock_mtu) << RTAX_MTU)
|
||||
| (((guint32) route->lock_mss) << RTAX_ADVMSS);
|
||||
guint32 ret;
|
||||
|
||||
ret = (((guint32) route->lock_window) << RTAX_WINDOW)
|
||||
| (((guint32) route->lock_cwnd) << RTAX_CWND)
|
||||
| (((guint32) route->lock_initcwnd) << RTAX_INITCWND)
|
||||
| (((guint32) route->lock_initrwnd) << RTAX_INITRWND)
|
||||
| (((guint32) route->lock_mtu) << RTAX_MTU)
|
||||
| (((guint32) route->lock_mss) << RTAX_ADVMSS);
|
||||
|
||||
/* the rto-min value is ignored by kernel unless the lock flag is set */
|
||||
ret |= (((guint32) route->rto_min_set) << RTAX_RTO_MIN);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@@ -314,7 +314,7 @@ guint _nm_platform_signal_id_get(NMPlatformSignalIdType signal_type);
|
||||
guint32 initrwnd; \
|
||||
\
|
||||
/* RTA_METRICS.RTAX_RTO_MIN (iproute2: rto_min) */ \
|
||||
/* Valid only when 'rto_min_set' is true. */ \
|
||||
/* Valid only when 'rto_min_set' is true. */ \
|
||||
guint32 rto_min; \
|
||||
\
|
||||
/* RTA_METRICS.RTAX_MTU (iproute2: mtu) */ \
|
||||
@@ -369,7 +369,7 @@ guint _nm_platform_signal_id_get(NMPlatformSignalIdType signal_type);
|
||||
bool quickack : 1; \
|
||||
\
|
||||
/* RTA_METRICS.RTAX_RTO_MIN (iproute2: rto_min) */ \
|
||||
/* If true, the 'rto_min' value is valid. */ \
|
||||
/* If true, the 'rto_min' value is valid. */ \
|
||||
bool rto_min_set : 1; \
|
||||
\
|
||||
/* if TRUE, the "metric" field is interpreted as an offset that is added to a default
|
||||
|
Reference in New Issue
Block a user