(racoon2 37) CFG_* in requests

Francis Dupont <[email protected]> Wed, 07 Dec 2005 11:53:28 +0100
Newsgroups gmane.network.ipv6.kame.racoon
Message-ID <[email protected]>
responder_ike_sa_auth_recv() in iked/ikev2.c should accept (and ignore
until they are handled) any CP payloads. The idea is to do as
the responder doesn't support CPs, using:

   If the data type requested in a CFG_REQUEST is not recognized or not
   supported, the responder MUST NOT return an error type but rather
   MUST either send a CFG_REPLY which MAY be empty or a reply not
   containing a CFG_REPLY payload at all. Error returns are reserved for
   cases where the request is recognized but cannot be performed as
   requested or the request is badly formatted.

and

   ... Those attributes that it
   did not accept MUST NOT be in the CFG_ACK Configuration Payload. If
   no attributes were accepted, the responder MUST return either an
   empty CFG_ACK payload or a response message without a CFG_ACK
   payload.

I don't know if we should check the position of CPs (before the SA)
or the internal value (no CFG_REPLY for instance). But the current
code rejects them as critical payloads when it is easy to just
ignore them. So please add a IKEV2_PAYLOAD_CONFIG case copied
from the vendor id one.

BTW we should do the same thing for informational_responder_recv()
even the usual CP (CFG_REQUEST(APPLICATION_VERSION(""))) is very
easy to handle. Quote again:

   In that case, it MUST either return an empty string or no
   CP payload if CP is not supported.

Thanks

[email protected]