Changeset 1936


Ignore:
Timestamp:
Apr 22, 2008 6:32:16 PM (17 years ago)
Author:
bennylp
Message:

Report NAT type as unknown rather than UDP blocked when test 1B failed (could happen when port 3479 is blocked). Thanks Helmut Wolf for the info.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/src/pjnath/nat_detect.c

    r1913 r1936  
    735735                    /* 
    736736                     * Strangely test 1B has failed. Maybe connectivity was 
    737                      * lost? 
     737                     * lost? Or perhaps port 3489 (the usual port number in 
     738                     * CHANGED-ADDRESS) is blocked? 
    738739                     */ 
    739                     end_session(sess, PJ_SUCCESS, PJ_STUN_NAT_TYPE_BLOCKED); 
     740                    switch (sess->result[ST_TEST_3].status) { 
     741                    case PJ_SUCCESS: 
     742                        /* Although test 1B failed, test 3 was successful. 
     743                         * It could be that port 3489 is blocked, while the 
     744                         * NAT itself looks to be a Restricted one. 
     745                         */ 
     746                        end_session(sess, PJ_SUCCESS,  
     747                                    PJ_STUN_NAT_TYPE_RESTRICTED); 
     748                        break; 
     749                    default: 
     750                        /* Can't distinguish between Symmetric and Port 
     751                         * Restricted, so set the type to Unknown 
     752                         */ 
     753                        end_session(sess, PJ_SUCCESS,  
     754                                    PJ_STUN_NAT_TYPE_ERR_UNKNOWN); 
     755                        break; 
     756                    } 
    740757                    break; 
    741758                default: 
Note: See TracChangeset for help on using the changeset viewer.