Commit ddd4aa424b866a08ceba7ddf38e61542c91b93a0
1 parent
7a71ed899e
Exists in
master
and in
7 other branches
inetpeer: Add redirect and PMTU discovery cached info.
Validity of the cached PMTU information is indicated by it's expiration value being non-zero, just as per dst->expires. The scheme we will use is that we will remember the pre-ICMP value held in the metrics or route entry, and then at expiration time we will restore that value. In this way PMTU expiration does not kill off the cached route as is done currently. Redirect information is permanent, or at least until another redirect is received. Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 2 changed files with 13 additions and 7 deletions Side-by-side Diff
include/net/inetpeer.h
... | ... | @@ -43,13 +43,17 @@ |
43 | 43 | */ |
44 | 44 | union { |
45 | 45 | struct { |
46 | - atomic_t rid; /* Frag reception counter */ | |
47 | - atomic_t ip_id_count; /* IP ID for the next packet */ | |
48 | - __u32 tcp_ts; | |
49 | - __u32 tcp_ts_stamp; | |
50 | - u32 metrics[RTAX_MAX]; | |
51 | - u32 rate_tokens; /* rate limiting for ICMP */ | |
52 | - unsigned long rate_last; | |
46 | + atomic_t rid; /* Frag reception counter */ | |
47 | + atomic_t ip_id_count; /* IP ID for the next packet */ | |
48 | + __u32 tcp_ts; | |
49 | + __u32 tcp_ts_stamp; | |
50 | + u32 metrics[RTAX_MAX]; | |
51 | + u32 rate_tokens; /* rate limiting for ICMP */ | |
52 | + unsigned long rate_last; | |
53 | + unsigned long pmtu_expires; | |
54 | + u32 pmtu_orig; | |
55 | + u32 pmtu_learned; | |
56 | + struct inetpeer_addr_base redirect_learned; | |
53 | 57 | }; |
54 | 58 | struct rcu_head rcu; |
55 | 59 | }; |
net/ipv4/inetpeer.c