Subject: [AAA-WG]: [Issue] Do not use Route-Record for answer routing

From: Jacques Caron <[email-masked]>
Date: Mon, 11 Jun 2001 13:50:00 +0200

Submitter name: Jacques Caron
Submitter email address: [email-masked]
Date first submitted: 11-Jun-2001
Reference:
Document: Base
Comment type: T
Priority: 2
Section: 5.x
Rationale/Explanation of issue:

Currently, relays/proxies are supposed to use a combination of Route-Record 
and Destination-Host to route answers back to the client. On the other 
hand, they need to save pending requests, including the local Hop-by-Hop 
identifier they assigned, and the original Hop-by-Hop identifier.

I propose to add the host the request was received from to the state 
information. Then we can remove Route-Record AVPs from answers, and use 
saved state information for answer routing. Route-Record AVPs would be used 
only in requests to perform loop checking.

Note that both the original Hop-by-Hop Identifier and the host the request 
was received from could be saved in a Proxy-State AVP, but since the whole 
request needs to be saved in the pending request list, I'm not really sure 
the Proxy-State AVP is useful at all?

Destination-Host would not be needed in answers either.

Requested changes:

[as this touches the same sections as the issue "Request & answer routing 
clarification" I just sent, this is based on the changes I sent, not the 
current draft]

In 5.1.9  Relaying and Proxying requests, add:
    The host the request was received from is also saved.

after the "The Hop-by-Hop identifier in the request is saved...".

In Figure 6, remove the Destination-Host and Route-Record AVPs on the bottom.

In 5.2  Diameter Answer Processing, replace:
       - The value of the Origin-Host AVP in the request is included in
         the answer's Destination-Host AVP.
       - There MUST NOT be any Destination-Realm AVP present in the
	answer.
with:
       - There MUST NOT be any Destination-Realm or Destination-Host AVPs
	present in the answer.

and replace:
       - Any Route-Record or Proxy-Info AVPs in the request MUST be added
         to the answer message, in the same order they were present in
         the request.
with:
       - Any Proxy-Info AVPs in the request MUST be added to the answer
	message, in the same order they were present in the request.

Replace:
5.2.2  Relaying and Proxying Answers

    A relay or proxy agent MUST only process Answers whose last Route-
    Record AVP matches one of its identities. Any answers that do not
    conform to this rule MUST be dropped. The last Route-Record AVP MUST
    be removed from the message before it is forwarded to the next hop,
    which is identified by the second to last Route-Record AVP.

    If the host in the Destination-Host AVP is in the peer table and
    there are no Route-Record AVPs in the message, the message MUST be
    forwarded to the peer.

    If the last Proxy-Info AVP in the message is targeted to the local
    Diameter server, the AVP MUST be removed.

    If a relay or proxy agent receives an answer with a Result-Code AVP
    indicating a failure, it MUST NOT modify the contents of the AVP. Any
    additional local errors detected SHOULD be logged, but not reflected
    in the Result-Code AVP. If the agent receives an answer message with
    a Result-Code AVP indicating success, and it wishes to modify the AVP
    to indicate an error, it MUST issue an STR on behalf of the access
    device.

    Prior to forwarding the answer, the agent MUST restore the original
    value of the Diameter header's Hop-by-Hop Identifier field.

With:
5.2.2  Relaying and Proxying Answers

    If the answer is for a request which was proxied or relayed, the agent
    MUST restore the original value of the Diameter header's Hop-by-Hop
    Identifier field.

    If the last Proxy-Info AVP in the message is targeted to the local
    Diameter server, the AVP MUST be removed before the answer is forwarded.

    The agent MUST then send the answer to the host which it received the
    original request from.

    If a relay or proxy agent receives an answer with a Result-Code AVP
    indicating a failure, it MUST NOT modify the contents of the AVP. Any
    additional local errors detected SHOULD be logged, but not reflected
    in the Result-Code AVP. If the agent receives an answer message with
    a Result-Code AVP indicating success, and it wishes to modify the AVP
    to indicate an error, it MUST issue an STR on behalf of the access
    device.

Replace:
5.3  Hiding Network Topology

    A Relay or Proxy agent routing messages outside of their
    administrative domain MAY need to hide the internal Diameter
    topology. This is done by removing all Route-Record AVPs in a
    request, and later adding them back into the corresponding answer, in
    the same order. Such agents MUST take care to not assume that the
    absence of any Route-Record AVPs implies the message is for local
    comsumption.

With:
5.3  Hiding Network Topology

    A Relay or Proxy agent routing messages outside of their
    administrative domain MAY need to hide the internal Diameter
    topology. This is done by removing all Route-Record AVPs in a
    request.

In 5.6  Destination-Host AVP, replace:
    The Destination-Host AVP (AVP Code 293) is of type OctetString,
    encoded in the UTF-8 [24] format, according to the Diameter identity
    rules defined in section 2.7. This AVP MUST be present in all
    unsolicited agent initiated messages, MAY be present in request
    messages, and MUST be present in Answer messages. The value of the
    Destination-Host AVP is set to the value of the Origin-Host AVP found
    in a message from the intended target host.

with:
    The Destination-Host AVP (AVP Code 293) is of type OctetString,
    encoded in the UTF-8 [24] format, according to the Diameter identity
    rules defined in section 2.7. This AVP MUST be present in all
    unsolicited agent initiated messages, MAY be present in request
    messages, and MUST NOT be present in Answer messages.

Other changes may be required in 14.1 and 14.2 to reflect this.

Jacques.

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com