Commit graph

512 commits

Author SHA1 Message Date
Iurii Egorov
14e4f35694 SPEC file for RPM build 2024-02-01 19:03:13 +03:00
Iurii Egorov
35e2612c82 SPEC file for RPM build 2024-02-01 18:52:10 +03:00
Iurii Egorov
a9fe336809 SPEC file for RPM build 2024-02-01 18:51:25 +03:00
Iurii Egorov
e9a7a9ee9f SPEC file for RPM build 2024-02-01 18:50:19 +03:00
Iurii Egorov
02d5d396df Merge branch 'build/deb' into changes-for-kmod 2024-02-01 18:43:06 +03:00
Iurii Egorov
62e3b21cc2 Naming unify 2024-01-19 15:27:39 +03:00
Iurii Egorov
8c1f047442 Naming unify 2024-01-19 15:02:26 +03:00
Iurii Egorov
a4aeb9e195 Bash completions 2024-01-17 19:45:38 +03:00
Mark Puha
1a74f346c1 naming convention fix 2024-01-16 14:13:31 +03:00
Iurii Egorov
761c2d5fb5 Prepare packaging 2023-12-09 18:02:43 +03:00
Iurii Egorov
6cca06e846 Prepare packaging 2023-12-09 17:22:39 +03:00
Iurii Egorov
115b2500d9 Prepare packaging 2023-12-09 17:12:52 +03:00
Iurii Egorov
dc3a0e73e1 Prepare packaging 2023-12-09 16:45:55 +03:00
Iurii Egorov
eec604dc95 Fix wg-quick 2023-11-30 10:18:00 +03:00
Iurii Egorov
98869a07e9 K 2023-11-30 07:47:32 +03:00
Iurii Egorov
17c71156f4 Revert "Change protocol type" 2023-11-30 01:12:24 +03:00
Iurii Egorov
eb2281b577 Change protocol type 2023-11-30 00:58:41 +03:00
Iurii Egorov
ddef70bf70 Change protocol type 2023-11-29 23:47:44 +03:00
Iurii Egorov
72a1165143 Change protocol type 2023-11-29 22:22:28 +03:00
Iurii Egorov
a1551010e5 Change protocol type 2023-11-29 22:22:06 +03:00
Iurii Egorov
d48157dac1 Fix indents 2023-11-20 22:59:53 +03:00
Iurii Egorov
58a1d1d290 Fix indents 2023-11-20 22:59:05 +03:00
Iurii Egorov
9634c932f5 Fix indents 2023-11-20 22:53:21 +03:00
Iurii Egorov
0ef35eed6f UAPI changes for Amnezia kernel module 2023-11-20 22:33:00 +03:00
pokamest
c9ff85e9ed
Merge pull request #1 from amnezia-vpn/new_fields_to_config
New fields to config
2023-09-25 05:16:16 -07:00
Mark Puha
18901ddeaf convert indentation&fix action 2023-09-24 17:44:33 +02:00
Mark Puha
be97b12dac change build extension 2023-09-24 17:30:51 +02:00
Mark Puha
55be21e50c fix workflow 2023-09-24 17:20:25 +02:00
Mark Puha
d6baf3ad66
Update windows-build.yml
Signed-off-by: Mark Puha <p.mark95@gmail.com>
2023-09-24 14:16:26 +02:00
Mark Puha
a3c7c20be7
Merge pull request #2 from amnezia-vpn/marko1777-patch-1
Create windows-build.yml
2023-09-24 14:11:15 +02:00
Mark Puha
718159b457
Create windows-build.yml
Signed-off-by: Mark Puha <p.mark95@gmail.com>
2023-09-24 14:10:47 +02:00
Mark Puha
1257df6788 add windows buid bat 2023-09-24 14:09:24 +02:00
Mark Puha
52d6ae3b9e new fields to freebsd 2023-09-20 05:01:30 +02:00
Mark Puha
be3e4e6db8 only send new fields when present 2023-09-19 06:02:45 +02:00
Mark Puha
f0854129a7 openbsd interface io fields 2023-09-15 10:39:16 +02:00
Mark Puha
c1008024ca remove print 2023-09-15 07:18:16 +02:00
Mark Puha
4dda7f6d0a add openbsd new fields 2023-09-15 07:09:56 +02:00
Mark Puha
f80e2c90e9 add windows new fields 2023-09-15 07:09:14 +02:00
Mark Puha
8e18546c25 add flags 2023-09-10 06:56:43 +02:00
Mark Puha
6747b3ebd9 minor modifications 2023-09-09 14:31:41 +02:00
Mark Puha
f632775430 compiling version of new fields 2023-09-09 07:37:06 +02:00
Jason A. Donenfeld
13f4ac4cb7 ipc: linux: enforce IFNAMSIZ limit
libmnl doesn't check lengths, so do our own checking before copying the
interface name to the netlink buffer.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-08-04 16:04:36 +02:00
Jason A. Donenfeld
729242a114 man: set private key in PreUp rather than PostUp
This is probably more sensible, since there's no point in letting
traffic flow before the interface is configured.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-05-18 16:39:49 +02:00
Daniel Gröber
e6888dd74e wg-quick: run PreUp hook after creating interface
Currently PreUp hooks run before the interface is created. This is
problematic for moving the device into a Linux VRFs as this will
currently clear all assigned IPv6 addressess (possibly a bug), so if we
did this in PostUp (i.e. before add_addr) we'll have to manually re-add
all assigned addresses. This is obviously less than ideal.

Instead create the wg device just before running PreUp hooks. We apply
this to all platforms for consistency.

Test case:

    $ ip link add vrf-test type vrf table 1234
    $ ip link add wg-test type wireguard
    $ ip addr add dev wg-test 192.168.42.42/24
    $ ip addr add dev wg-test fe80::/64

    $ ip -br addr show wg-test
    wg-test          DOWN           192.168.42.42/24 fe80::/64

    $ ip link set dev wg-test master vrf-test

    $ ip -br addr show wg-test
    wg-test          DOWN           192.168.42.42/32

Signed-off-by: Daniel Gröber <dxld@darkboxed.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-05-18 16:38:34 +02:00
Dmitry Selivanov
b4f6b4f229 show: fix show all endpoints output
Currently "wg show all endpoints" prints interface name only once
while other "show all" commands print it on each line as man says.

Signed-off-by: Dmitry Selivanov <dseliv@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-02-08 13:47:47 -03:00
Kyle Evans
139aac59a5 ipc: freebsd: NULL out some freed memory in kernel_set_device()
The `err` path in kernel_set_device() will attempt to free() allocated
nvl_peers, but these two cases meant we could end up attempting a use
after free or a double free, as we rely on nvlist_destroy(NULL) being
a NOP as well as free(NULL).

FreeBSD-Coverity:	1500421
Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-11-03 19:57:26 +01:00
Kyle Evans
dbf49a7d17 ipc: freebsd: avoid leaking memory in kernel_get_device()
Primarily, front-load validation of an allowed-ip entry to before we
allocate `aip`, so that we don't need to free() it if we end up skipping
this entry.  Assert that `aip` is NULL after we exit the loop, as we
should have transfered ownership to the `peer` or freed it in all paths
through the allowed-ip loop.

FreeBSD-Coverity:	1500405
Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-11-03 19:57:21 +01:00
Jason A. Donenfeld
ca2e89ff21 show: apply const to right part of pointer
Without this -Wcast-qual complains:

show.c:30:43: warning: cast from 'const void *' to 'const void **' drops const qualifier [-Wcast-qual]
        const struct wgpeer *a = *(const void **)first, *b = *(const void **)second;
                                                 ^
show.c:30:71: warning: cast from 'const void *' to 'const void **' drops const qualifier [-Wcast-qual]
        const struct wgpeer *a = *(const void **)first, *b = *(const void **)second;

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-10-31 15:39:30 +01:00
Kyle Evans
7b2ae7aa2f ipc: freebsd: move if_wg path to reflect new in-tree location
When we re-added if_wg to the tree, we changed directories in dev to
strip the if_ (we don't use this prefix for other interfaces'
directories). Adjust it here as a convenience, so that when we import
wireguard-tools to FreeBSD the path will just work as-is with our usual
build.

Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-10-29 03:51:47 +02:00
Tom Yan
71799a8f6d wg-quick: linux: prevent traffic from momentarily leaking into tunnel
The wireguard route table ip rule should stay as a no-op until the
`suppress_prefixlength 0 table main` rule is in effect. Therefore, add
the wireguard default route to its route table after the latter rule is
added.

Signed-off-by: Tom Yan <tom.ty89@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-06-17 13:53:43 +02:00