浏览代码

Fix cdp routing for Rx interface

Avoid to force vendor_id to zero
if Auth_Application_Id or Acct_Application_Id AVPs
Federico Favaro 10 年之前
父节点
当前提交
4fc2e10939
共有 1 个文件被更改,包括 4 次插入6 次删除
  1. 4 6
      modules/cdp/routing.c

+ 4 - 6
modules/cdp/routing.c

@@ -193,16 +193,14 @@ peer* get_routing_peer(cdp_session_t* cdp_session, AAAMessage *m) {
 
     avp_vendor = AAAFindMatchingAVP(m, 0, AVP_Vendor_Id, 0, AAA_FORWARD_SEARCH);
     avp = AAAFindMatchingAVP(m, 0, AVP_Auth_Application_Id, 0, AAA_FORWARD_SEARCH);
-    if (avp) {
-        if (avp_vendor) vendor_id = get_4bytes(avp_vendor->data.s);
-        else vendor_id = 0;
+    if (avp && avp_vendor) {
+	vendor_id = get_4bytes(avp_vendor->data.s);
         app_id = get_4bytes(avp->data.s);
     }
 
     avp = AAAFindMatchingAVP(m, 0, AVP_Acct_Application_Id, 0, AAA_FORWARD_SEARCH);
-    if (avp) {
-        if (avp_vendor) vendor_id = get_4bytes(avp_vendor->data.s);
-        else vendor_id = 0;
+    if (avp && avp_vendor) {
+	vendor_id = get_4bytes(avp_vendor->data.s);
         app_id = get_4bytes(avp->data.s);
     }