Ignore:
Timestamp:
May 23, 2019 1:42:27 PM (2 years ago)
Author:
riza
Message:

Close #2200: Ignore/discard DNS SRV response with truncated flag set.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib-util/src/pjlib-util/resolver.c

    r5981 r6000  
    17771777    pj_grp_lock_acquire(resolver->grp_lock); 
    17781778 
    1779     /* Save/update response cache. */ 
    1780     update_res_cache(resolver, &q->key, status, PJ_TRUE, dns_pkt); 
    1781      
     1779    /* Truncated responses MUST NOT be saved (cached). */ 
     1780    if (PJ_DNS_GET_TC(dns_pkt->hdr.flags) == 0) { 
     1781        /* Save/update response cache. */ 
     1782        update_res_cache(resolver, &q->key, status, PJ_TRUE, dns_pkt); 
     1783    } 
     1784 
    17821785    /* Recycle query objects, starting with the child queries */ 
    17831786    if (!pj_list_empty(&q->child_head)) { 
Note: See TracChangeset for help on using the changeset viewer.