1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
/* Libreswan ISAKMP Quirks handling
* Copyright (C) 2003 Michael Richardson <mcr@xelerance.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <https://www.gnu.org/licenses/gpl2.txt>.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*/
#include "quirks.h"
#include "defs.h"
#include "state.h"
#include "demux.h"
/*
* PAUL: Why are the quirks in the message digest and not in the state?
* EECK: they are in both! Candidate to phase out completely
*
* message digest quirks are merged into state quirks by merge_quirks.
*/
void merge_quirks(struct ike_sa *ike, const struct msg_digest *md)
{
struct isakmp_quirks *dq = &ike->sa.st_v1_quirks;
const struct isakmp_quirks *sq = &md->v1_quirks;
dq->xauth_ack_msgid |= sq->xauth_ack_msgid;
dq->modecfg_pull_mode |= sq->modecfg_pull_mode;
/* ??? ike->sa.quirks.qnat_traversal is never used */
if (dq->qnat_traversal_vid < sq->qnat_traversal_vid)
dq->qnat_traversal_vid = sq->qnat_traversal_vid;
dq->xauth_vid |= sq->xauth_vid;
}
|