[Swan] an xauth logging message
Paul Wouters
paul at nohats.ca
Fri Mar 1 07:47:51 EET 2013
On Fri, 1 Mar 2013, D. Hugh Redelmeier wrote:
> Are xauth_server and xauth_client mutually exclusive?
> Are modecfg_server and modecfg_client mutually exclusive?
Yes both are mutually exclusive. but the two are now. That is,
you can be an xauth server but a modecfg_client (it is called
pull or push mode but that term too is confusing when you think
that initiator/responder can flip around as well)
> If so, perhaps a PASSERT and a simpler message is in order.
>
> Assuming all are independent, I think that this generates a simpler
> message:
>
> DBG(DBG_CONTROLMORE , DBG_log("this is a%s%s%s%s in state %s. "
> "Reply with UNSUPPORTED_EXCHANGE_TYPE"
> , st->st_connection->spd.this.xauth_server ? " xauthserver" : ""
> , st->st_connection->spd.this.xauth_client ? " xauthclient" : ""
> , st->st_connection->spd.this.modecfg_server ? " modecfgserver" : ""
> , st->st_connection->spd.this.modecfg_client ? " modecfgclient" : ""
> , enum_name(&state_names, st->st_state)
> ));
>
> Admittedly, this looks funny if none of the fields is true, but I
> would guess this never happens. Am I wrong?
Nope, that's right. I'm fine with this change. I prefer it over assuming
the server-client is exclusive for logging, though I guess it _should_
never happen and in that sense a passert is justified.
Paul
More information about the Swan
mailing list