[Swan-dev] [libreswan/libreswan] Multiple compile errors with gcc (GCC) 7.1.1 20170528 (#104)

Paul Wouters paul at nohats.ca
Wed Jun 14 19:39:38 UTC 2017

On Wed, 14 Jun 2017, Antony Antony wrote:

> for Wimplicit-fallthrough=3 complaince
> I have a patch sitting around when I played with F26. It is attached here to test.
> It could be applied, I haven't double checked it yet.

So I checked the eroute one, and cleaned up the break;s so it makes more
sense. The one in pfkey.c is weird:

diff --git a/linux/net/ipsec/pfkey_v2_parse.c
index 363a5d6..247cd21 100644
--- a/linux/net/ipsec/pfkey_v2_parse.c
+++ b/linux/net/ipsec/pfkey_v2_parse.c
@@ -1302,6 +1302,7 @@ int pfkey_msg_parse(struct sadb_msg *pfkey_msg,
+               /* FALLTHROUGH */
         case K_SADB_ACQUIRE:
         case K_SADB_REGISTER:
         case K_SADB_EXPIRE:

That basically makes the resulting chunk of code work on _every_ case,
which leads to the question, why is it inside the switch().

A quick peek shows this goes at least as far back as openswan-2.3.x,
probably even further. So maybe Richard can answer this one :)


More information about the Swan-dev mailing list