diff options
| author | Paul Donald | 2026-01-31 14:56:28 +0000 |
|---|---|---|
| committer | Robert Marko | 2026-02-02 11:25:52 +0000 |
| commit | 400742a855e2d3e2288ba3b224037bc464dbbdf2 (patch) | |
| tree | fab095a733c1ce9fd6a55b79ef7173cd4d6fcb48 | |
| parent | d59b360ceeb132b5822087758910487042d41480 (diff) | |
| download | openwrt-400742a855e2d3e2288ba3b224037bc464dbbdf2.tar.gz | |
wireguard-tools: add protocol renew handler
- add a renew handler
- add a peer detect handler
( benefits from https://github.com/openwrt/netifd/pull/66 )
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21784
Signed-off-by: Robert Marko <robimarko@gmail.com>
| -rw-r--r-- | package/network/utils/wireguard-tools/files/wireguard.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/package/network/utils/wireguard-tools/files/wireguard.sh b/package/network/utils/wireguard-tools/files/wireguard.sh index ca9da81032..78a432a8d1 100644 --- a/package/network/utils/wireguard-tools/files/wireguard.sh +++ b/package/network/utils/wireguard-tools/files/wireguard.sh @@ -16,6 +16,9 @@ fi } proto_wireguard_init_config() { + renew_handler=1 + peer_detect=1 + proto_config_add_string "private_key" proto_config_add_int "listen_port" proto_config_add_int "mtu" @@ -203,6 +206,11 @@ proto_wireguard_setup() { proto_send_update "${config}" } +proto_wireguard_renew() { + local interface="$1" + proto_wireguard_setup "$interface" +} + proto_wireguard_teardown() { local config="$1" ip link del dev "${config}" >/dev/null 2>&1 |