Skip to content

Commit

Permalink
Update wireguard.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderMalmstrom committed Nov 20, 2024
1 parent 555e9aa commit 40a2b15
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions modules/wireguard.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import sqlite3
import os
import ipcalc

import sys

DB_FILE = '/etc/ipplan.db'

Expand All @@ -31,11 +31,10 @@ def generate(host, *args):

if res:
netmask, gatewayip = res
tunnelip = ipcalc.IP(gatewayip) + 4
tunnelip = str(tunnelip) + '/' + str(netmask)
else:
netmask, gatewayip = None, None

tunnelip = ipcalc.IP(gatewayip) + 4
tunnelip = str(tunnelip) + '/' + str(netmask)

info = {}
info['current_event'] = current_event
Expand Down

0 comments on commit 40a2b15

Please sign in to comment.