Index: pbx/pbx_dundi.c =================================================================== --- pbx/pbx_dundi.c (revision 341249) +++ pbx/pbx_dundi.c (working copy) @@ -974,9 +974,9 @@ sizeof(trans->parent->dr[trans->parent->respcount].tech)); trans->parent->respcount++; ast_clear_flag_nonstd(trans->parent->hmd, DUNDI_HINT_DONT_ASK); - } else if (trans->parent->dr[z].weight > ies->answers[x]->weight) { + } else if (trans->parent->dr[z].weight > ntohs(ies->answers[x]->weight)) { /* Update weight if appropriate */ - trans->parent->dr[z].weight = ies->answers[x]->weight; + trans->parent->dr[z].weight = ntohs(ies->answers[x]->weight); } } else ast_log(LOG_NOTICE, "Dropping excessive answers in precache for %s@%s\n", @@ -1752,9 +1752,9 @@ sizeof(trans->parent->dr[trans->parent->respcount].tech)); trans->parent->respcount++; ast_clear_flag_nonstd(trans->parent->hmd, DUNDI_HINT_DONT_ASK); - } else if (trans->parent->dr[z].weight > ies.answers[x]->weight) { + } else if (trans->parent->dr[z].weight > ntohs(ies.answers[x]->weight)) { /* Update weight if appropriate */ - trans->parent->dr[z].weight = ies.answers[x]->weight; + trans->parent->dr[z].weight = ntohs(ies.answers[x]->weight); } } else ast_log(LOG_NOTICE, "Dropping excessive answers to request for %s@%s\n",