Subject: [pcp] race condition between prefer-failure and map update

From: Mayuresh Bakshi <[email-masked]>
Date: Wed, 28 Mar 2012 14:23:17 -0700

I am trying to interpret below in section 13.2:

   There can exist a race condition between the MAP Opcode using the
   PREFER_FAILURE option and Mapping Update (Section 14.2<http://tools.ietf.org/html/draft-ietf-pcp-base-24#section-14.2>).  Because of
   this, the PCP client MUST validate that the External IP Address and
   Port in a success response matches the associated suggested values
   from the request.  If they don't match, it is because the Mapping
   Update was sent before the MAP request was processed.  If the PCP
   server has no use for this new mapping, it SHOULD delete the mapping.

What is PCP server supposed to do when PREFER_FAILURE option packet is received after MAP update AND PREFER_FAILURE suggested external IP and port doesn;t match that of earlier map update.

        -> Return 'CANNOT_PROVIDE_EXTERNAL' OR

        -> Treat it as refresh (lifetime) for the internal IP and port and send response with already assigned external IP and port (different than those in PREFER-FAILURE option packet)

Last statement looks little ambiguous, 'If the PCP server has no use for this new mapping, it SHOULD delete the mapping', is PCP server expected to delete mapping created thru update OR is it client who should send delete for this mapping and resend PREFER_FAILURE option packet?

-Mayuresh

---

From: "Dan Wing" <[email-masked]>
Date: Thu, 29 Mar 2012 14:06:52 +0200

> -----Original Message-----
> From: [email-masked] [mailto:[email-masked]] On Behalf Of
> Mayuresh Bakshi
> Sent: Wednesday, March 28, 2012 11:23 PM
> To: [email-masked]
> Subject: [pcp] race condition between prefer-failure and map update
> 
> 
>    PREFER_FAILURE option and Mapping Update (Section
> 14.2<http://tools.ietf.org/html/draft-ietf-pcp-base-24#section-14.2>).
> Because of
> What is PCP server supposed to do when PREFER_FAILURE option packet is
> received after MAP update AND PREFER_FAILURE suggested external IP and
> port doesn;t match that of earlier map update.
>

Right.

>         -> Treat it as refresh (lifetime) for the internal IP and port
> and send response with already assigned external IP and port (different
> than those in PREFER-FAILURE option packet)

That would violate the semantics of PREFER_FAILURE.

> Last statement looks little ambiguous, 'If the PCP server has no use
> for this new mapping, it SHOULD delete the mapping', is PCP server
> expected to delete mapping created thru update OR is it client who
> should send delete for this mapping and resend PREFER_FAILURE option
> packet?

That is fixed in -25 (which is not yet published), which says that
the PCP client does that deletion if the PCP client doesn't have use
for the created mapping.  (Most of the time, the PCP client will have 
a use for the mapping, which is why PREFER_FAILURE is nearly always 
unnecessary and just causes an additional PCP round trip.)

-d

> 
> -Mayuresh
> _______________________________________________
> pcp mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/pcp