[PATCH] wireguard (gcc13): cast enum limits members to int in prints

2022-10-31 Thread Jiri Slaby (SUSE)
Since gcc13, each member of an enum has the same type as the enum [1]. And that is inherited from its members. Provided "REKEY_AFTER_MESSAGES = 1ULL << 60", the named type is unsigned long. This generates warnings with gcc-13: error: format '%d' expects argument of type 'int', but argument 6

WireGuard namespacing/isolation on Windows

2022-10-31 Thread Madars Virza
Hi! Consider the following use case: preventing accidental WebRTC-style information leaks. These leaks used to happen because WebRTC JS API exposes IP enumeration even if no packets get sent over the corresponding interfaces (i.e., even though the default route is the VPN endpoint, WebRTC API

Re: [PATCH] wireguard (gcc13): cast enum limits members to int in prints

2022-10-31 Thread Jason A. Donenfeld
Hi Jiri, On Mon, Oct 31, 2022 at 12:44:24PM +0100, Jiri Slaby (SUSE) wrote: > Since gcc13, each member of an enum has the same type as the enum [1]. And > that is inherited from its members. Provided "REKEY_AFTER_MESSAGES = 1ULL > << 60", the named type is unsigned long. > > This generates

Re: [PATCH] wireguard (gcc13): cast enum limits members to int in prints

2022-10-31 Thread Jiri Slaby
Hi, On 31. 10. 22, 14:07, Jason A. Donenfeld wrote: On Mon, Oct 31, 2022 at 12:44:24PM +0100, Jiri Slaby (SUSE) wrote: Since gcc13, each member of an enum has the same type as the enum [1]. And that is inherited from its members. Provided "REKEY_AFTER_MESSAGES = 1ULL << 60", the named type is