diff options
| author | Kui-Feng Lee <[email protected]> | 2024-02-08 14:06:49 -0800 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2024-02-12 10:24:12 +0000 |
| commit | 129e406e1811538c1afc9c8e97d61bb18eed3363 (patch) | |
| tree | bb223ddcf21cf7c09effaed87a03d642d3530c17 /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py | |
| parent | 9c52994e32c5d8aaff13b1a13f7b35b988b02b26 (diff) | |
net/ipv6: set expires in rt6_add_dflt_router().
Pass the duration of a lifetime (in seconds) to the function
rt6_add_dflt_router() so that it can properly set the expiration time.
The function ndisc_router_discovery() is the only one that calls
rt6_add_dflt_router(), and it will later set the expiration time for the
route created by rt6_add_dflt_router(). However, there is a gap of time
between calling rt6_add_dflt_router() and setting the expiration time in
ndisc_router_discovery(). During this period, there is a possibility that a
new route may be removed from the routing table. By setting the correct
expiration time in rt6_add_dflt_router(), we can prevent this from
happening. The reason for setting RTF_EXPIRES in rt6_add_dflt_router() is
to start the Garbage Collection (GC) timer, as it only activates when a
route with RTF_EXPIRES is added to a table.
Suggested-by: David Ahern <[email protected]>
Reviewed-by: Hangbin Liu <[email protected]>
Reviewed-by: David Ahern <[email protected]>
Signed-off-by: Kui-Feng Lee <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py')
0 files changed, 0 insertions, 0 deletions