Description: |
|
|---|
bug 731 webagent dns hosts do not get cached
Review Request #223 — Created April 18, 2024 and submitted
| Information | |
|---|---|
| tanya | |
| APV10 | |
| rel_apv_10_7, rel_apv_10_7_0, rel_apv_10_7_1, | |
| 731 | |
| Reviewers | |
| kdutta, timlai, wli | |
When webagent is configured and webagent cache is on, "show webagent dns host" does not display the cached hosts because they are not cached.
Turned out that ttl is needed to be set when entry is added to dns cache. ttl used to be parsed from the output of "nslookup -debug -timeout=5". we stopped using nslookup to fix bug 394. To make dns lookup asynchronus we used getaddrinfo_a and it turns out it does not provide ttl for hosts so ttl was ommitted, which resulted in host not to be cached.
To fix i used a constant default ttl 150 when dns lookup context is filled in.
I think for now it's ok, we could make it configurable if needed.
configured webagent and access webisites using forward proxy enabled on the browser and pointing to webagent ip.
chech the output of "show webagent dns host". Prio the fix the "show webagent dns host" did not show dynamic hosts.an-G35gm8MXRZ(config)#show webagent dns host
The following is static webagent dns record:The following is dynamic webagent dns record:
www.gstatic.com:
142.250.188.227 TTL:148
google-ohttp-relay-safebrowsing.fastly-edge.com:
151.101.1.91 TTL:144
tpc.googlesyndication.com:
142.250.72.161 TTL:144
cert.int-x3.letsencrypt.org:
23.208.9.227 TTL:143
www.googleadservices.com:
142.250.188.226 TTL:143
apps.identrust.com:
96.7.129.65 TTL:143
hb.yahoo.net:
96.16.55.16 TTL:143
ad-delivery.net:
130.211.23.194 TTL:143
api.btloader.com:
130.211.23.194 TTL:143
pagead2.googlesyndication.com:
142.250.68.98 TTL:143
