net: Abstract default ADVMSS behind an accessor.
Make all RTAX_ADVMSS metric accesses go through a new helper function, dst_metric_advmss(). Leave the actual default metric as "zero" in the real metric slot, and compute the actual default value dynamically via a new dst_ops AF specific callback. For stacked IPSEC routes, we use the advmss of the path which preserves existing behavior. Unlike ipv4/ipv6, DecNET ties the advmss to the mtu and thus updates advmss on pmtu updates. This inconsistency in advmss handling results in more raw metric accesses than I wish we ended up with. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -825,7 +825,7 @@ unsigned int cxgbi_sock_select_mss(struct cxgbi_sock *csk, unsigned int pmtu)
|
||||
unsigned int idx;
|
||||
struct dst_entry *dst = csk->dst;
|
||||
|
||||
csk->advmss = dst_metric(dst, RTAX_ADVMSS);
|
||||
csk->advmss = dst_metric_advmss(dst);
|
||||
|
||||
if (csk->advmss > pmtu - 40)
|
||||
csk->advmss = pmtu - 40;
|
||||
|
Reference in New Issue
Block a user