[Swan-dev] Fwd: [Swan-commit] Changes to ref refs/heads/master
Andrew Cagney
andrew.cagney at gmail.com
Wed Nov 21 15:44:14 UTC 2018
Yea, two changes:
- move the function to demux.[hc]
The function, while currently IKEv2 specific, belongs in demux.[hc] as
it operates on the msg_digest; and like the commit points out, several
strange #includes were eliminated
- rename v2_msg_role() to msg_role()
This one I umed and arhd over a bit. It makes code like:
switch (msg_role(md)) {
case MESSAGE_REQUEST: ...
slightly less verbose. However, to your point, it seems that only
IKEv2 can easily figure out if a message is a request or a response
(which really scares me). Given this, should
MESSAGE_{REQUEST,RESPONSE} also get the V2_* treatment vis:
switch(v2_msg_role(md)) {
case V2_MESSAGE_REQUEST: ...
but that is really looking cumbersome.
your call,
On Tue, 20 Nov 2018 at 22:26, Paul Wouters <paul at nohats.ca> wrote:
>
> Why this change? Especially in a file used by v1 and v2 code it is important to use the prefix.
>
> Sent from mobile device
>
> Begin forwarded message:
>
> From: Andrew Cagney <cagney at vault.libreswan.fi>
> Date: November 21, 2018 at 08:54:09 GMT+7
> To: swan-commit at lists.libreswan.org
> Subject: [Swan-commit] Changes to ref refs/heads/master
> Reply-To: swan-dev at lists.libreswan.org
>
> New commits:
> commit e22a671b5ce2ea49b947c7c054db69436f4b2376
> Author: Andrew Cagney <cagney at gnu.org>
> Date: Tue Nov 20 17:47:34 2018 -0500
>
> demux: rename v2_msg_role() to msg_role(), move to demux.[hc]
>
> and eliminate several #includes.
>
> Still IKEv2 only, suspect IKEv1 is impossible.
>
> _______________________________________________
> Swan-commit mailing list
> Swan-commit at lists.libreswan.org
> https://lists.libreswan.org/mailman/listinfo/swan-commit
>
> _______________________________________________
> Swan-dev mailing list
> Swan-dev at lists.libreswan.org
> https://lists.libreswan.org/mailman/listinfo/swan-dev
More information about the Swan-dev
mailing list