Re: making wireguard work on RHEL7/etc.

2018-04-05 Thread Daniel Kahn Gillmor
On Thu 2018-04-05 11:08:20 -0400, Daniel Kahn Gillmor wrote: > On Tue 2017-06-27 13:08:14 +0200, Jason A. Donenfeld wrote: >> compat.h is a dumpster fire already. Tons of people use the RHEL kernel. >> I think supporting it won't make an already gross cess pool any more >> disgusting. It's a file o

Re: making wireguard work on RHEL7/etc.

2018-04-05 Thread Daniel Kahn Gillmor
On Tue 2017-06-27 13:08:14 +0200, Jason A. Donenfeld wrote: > compat.h is a dumpster fire already. Tons of people use the RHEL kernel. > I think supporting it won't make an already gross cess pool any more > disgusting. It's a file of hacks; I might as well add another. > > (I probably won't add ha

Re: making wireguard work on RHEL7/etc.

2017-06-27 Thread Jason A. Donenfeld
Great, any warnings when compiling? On Jun 27, 2017 23:30, wrote: > Jason A. Donenfeld wrote: > > > Okay, and for the kernel, please give this commit a try: > > > > https://git.zx2c4.com/WireGuard/commit/?id= > 32e20ef627048ffa7f8cb3567e6b4c639cd42607 > > > > Or just run the latest git master. >

Re: making wireguard work on RHEL7/etc.

2017-06-27 Thread wireguard
Jason A. Donenfeld wrote: > Okay, and for the kernel, please give this commit a try: > > https://git.zx2c4.com/WireGuard/commit/?id=32e20ef627048ffa7f8cb3567e6b4c639cd42607 > > Or just run the latest git master. > after a quick wg-quick stop / rmmod / insmod / wg-quick start / ping this seems to

Re: making wireguard work on RHEL7/etc.

2017-06-27 Thread Jason A. Donenfeld
Okay, and for the kernel, please give this commit a try: https://git.zx2c4.com/WireGuard/commit/?id=32e20ef627048ffa7f8cb3567e6b4c639cd42607 Or just run the latest git master. ___ WireGuard mailing list WireGuard@lists.zx2c4.com https://lists.zx2c4.com/

Re: making wireguard work on RHEL7/etc.

2017-06-27 Thread Jason A. Donenfeld
Okay, nicer solution found: https://git.zx2c4.com/WireGuard/commit/?id=1af4fc16054aeab9ef4aac0f9cb42f0dd924bf40 ___ WireGuard mailing list WireGuard@lists.zx2c4.com https://lists.zx2c4.com/mailman/listinfo/wireguard

Re: making wireguard work on RHEL7/etc.

2017-06-27 Thread Jason A. Donenfeld
On Tue, Jun 27, 2017 at 08:43:30PM +0100, wiregu...@wut.to wrote: > GNU bash, version 4.2.46(1)-release (x86_64-redhat-linux-gnu) Arg. Looks like namerefs were only added in bash 4.3. Annoying. The fix looks something like this, but it's so ugly and bothers me: diff --git a/src/tools/wg-quick.bas

Re: making wireguard work on RHEL7/etc.

2017-06-27 Thread wireguard
Jason A. Donenfeld wrote: > On Tue, Jun 27, 2017 at 1:38 PM, wrote: > > I don't have a system that has that option in it, so no. As it stands > > wg-quick does not work on a RHEL/Amazon AMI instance. > > Alright. Would you mind reporting the value of `bash --version` on > there? I don't really l

Re: making wireguard work on RHEL7/etc.

2017-06-27 Thread Jason A. Donenfeld
On Tue, Jun 27, 2017 at 1:38 PM, wrote: > I don't have a system that has that option in it, so no. As it stands > wg-quick does not work on a RHEL/Amazon AMI instance. Alright. Would you mind reporting the value of `bash --version` on there? I don't really like to support bash 3, but maybe I'd b

Re: making wireguard work on RHEL7/etc.

2017-06-27 Thread wireguard
Jason A. Donenfeld wrote: > On Mon, Jun 26, 2017 at 09:45:14PM +0100, wiregu...@wut.to wrote: > > another fix for RHEL7/etc., the version of bash included doesn't support > > 'local -n' (neither does Amazon AMI Linux either) > > > > diff --git a/src/tools/wg-quick.bash b/src/tools/wg-quick.bash >

Re: making wireguard work on RHEL7/etc.

2017-06-27 Thread Jason A. Donenfeld
On Tue, Jun 27, 2017 at 11:39:06AM +0200, Andrej Kacian wrote: > On Tue, 27 Jun 2017 08:25:31 +0100 (BST) > wiregu...@wut.to wrote: > > > > I wonder - is it a good idea to depend on > > > nonstandard, distribution-specific defines like this? This kind of > > > modification IMHO belongs in a local

Re: making wireguard work on RHEL7/etc.

2017-06-27 Thread Jason A. Donenfeld
On Mon, Jun 26, 2017 at 09:45:14PM +0100, wiregu...@wut.to wrote: > another fix for RHEL7/etc., the version of bash included doesn't support > 'local -n' (neither does Amazon AMI Linux either) > > diff --git a/src/tools/wg-quick.bash b/src/tools/wg-quick.bash > index 6edcd3a..afec996 100755 > ---

Re: making wireguard work on RHEL7/etc.

2017-06-27 Thread Jason A. Donenfeld
On Mon, Jun 26, 2017 at 08:55:02PM +0100, wiregu...@wut.to wrote: > I think this might work ... > > I was still able to compile on Amazon AMI/4.9.32 Kernel Thanks! This isn't the proper way to submit a patch, but I'll examine the diff and roll something satisfactory myself. Thanks a bunch for doi

Re: making wireguard work on RHEL7/etc.

2017-06-27 Thread Andrej Kacian
On Tue, 27 Jun 2017 08:25:31 +0100 (BST) wiregu...@wut.to wrote: > > I wonder - is it a good idea to depend on > > nonstandard, distribution-specific defines like this? This kind of > > modification IMHO belongs in a local patch applied during a rpmbuild > > for a RHEL/Centos package. > > I thi

Re: making wireguard work on RHEL7/etc.

2017-06-27 Thread wireguard
Andrej Kacian wrote: > On Mon, 26 Jun 2017 11:57:56 +0200 > "Jason A. Donenfeld" wrote: > > > Excellent! > > > > Indeed let's roll with that. Perhaps something quite specific, though, > > like: > > > > #if RHEL_RELEASE_CODE <= RHEL_RELEASE_VERSION(7,3) > > > > If you want to reroll your patches a

Re: making wireguard work on RHEL7/etc.

2017-06-26 Thread Andrej Kacian
On Mon, 26 Jun 2017 11:57:56 +0200 "Jason A. Donenfeld" wrote: > Excellent! > > Indeed let's roll with that. Perhaps something quite specific, though, like: > > #if RHEL_RELEASE_CODE <= RHEL_RELEASE_VERSION(7,3) > > If you want to reroll your patches around this, in a really clean way, > and s

Re: making wireguard work on RHEL7/etc.

2017-06-26 Thread wireguard
another fix for RHEL7/etc., the version of bash included doesn't support 'local -n' (neither does Amazon AMI Linux either) diff --git a/src/tools/wg-quick.bash b/src/tools/wg-quick.bash index 6edcd3a..afec996 100755 --- a/src/tools/wg-quick.bash +++ b/src/tools/wg-quick.bash @@ -54,7 +54,7 @@ pars

Re: making wireguard work on RHEL7/etc.

2017-06-26 Thread wireguard
I think this might work ... I was still able to compile on Amazon AMI/4.9.32 Kernel diff --git a/src/compat/compat.h b/src/compat/compat.h index 159abb1..903c9be 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -7,6 +7,13 @@ #include #include +//#undef LINUX_VERSION_CODE +//

Re: making wireguard work on RHEL7/etc.

2017-06-26 Thread Jason A. Donenfeld
Actually, you're right. This seems best: #if defined(RHEL_MAJOR) && RHEL_MAJOR <= 7 Looking forward to your patches! ___ WireGuard mailing list WireGuard@lists.zx2c4.com https://lists.zx2c4.com/mailman/listinfo/wireguard

Re: making wireguard work on RHEL7/etc.

2017-06-26 Thread Jason A. Donenfeld
Excellent! Indeed let's roll with that. Perhaps something quite specific, though, like: #if RHEL_RELEASE_CODE <= RHEL_RELEASE_VERSION(7,3) If you want to reroll your patches around this, in a really clean way, and submit them using git-send-email to the list, I can do a proper review and we can

Re: making wireguard work on RHEL7/etc.

2017-06-26 Thread wireguard
Jason A. Donenfeld wrote: > Are you aware of any RHEL-specific defines I might be able to use to > differentiate? A quick look around found this, I think conditional code on RHEL_MAJOR is probably the way to go, maybe "If KERNEL_VERSION() or RHEL_MAJOR then " $ cat /usr/include/linux/version.h

Re: making wireguard work on RHEL7/etc.

2017-06-26 Thread Jason A. Donenfeld
Hey, Thanks so much for doing the mind numbing work of trudging through all those ifdefs. Maintaining compat.h is truly a horrifying experience, and now somebody can commiserate with me :). Obviously these patches aren't mergable as-is, but it functions as a treasure map for how to actually go ab

Re: making wireguard work on RHEL7/etc.

2017-06-26 Thread wireguard
Aaron Muir Hamilton wrote: > This is bizarre, isn't the current RHEL/CentOS/Scientific Linux 7 kernel > a 3.10 series? Are these ifdefs only wrong on RHEL derivatives? > I think 'yes' to your second question. RedHat seem to patch and backport excessively from various versions. I am no expert so

Re: making wireguard work on RHEL7/etc.

2017-06-26 Thread Aaron Muir Hamilton
This is bizarre, isn't the current RHEL/CentOS/Scientific Linux 7 kernel a 3.10 series? Are these ifdefs only wrong on RHEL derivatives? ___ WireGuard mailing list WireGuard@lists.zx2c4.com https://lists.zx2c4.com/mailman/listinfo/wireguard

making wireguard work on RHEL7/etc.

2017-06-24 Thread wireguard
hello, the two diffs attached (hopefully not eaten by mailman) made wireguard work for me on Scientific Linux 7.3 and CentOS Linux 7.3.1611 hopefully they are useful for other people they were patched against the source installed by wireguard-dkms-0.0.20170613-1.el7.centos.noarch in /usr/src/wir