Skip to content
Snippets Groups Projects
Commit 2413cb75 authored by Jiří Kalvoda's avatar Jiří Kalvoda
Browse files

NET dhcpcd magic

parent 72cd80fb
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,27 @@ msg_prefix="$interface: dhcpd.enter-hook:"
echo $msg_prefix $reason $interface $if_up $ifssid
mtu_wg_blatto(){
ip link set wg-blatto mtu $1
}
mtu_limit(){
if [ "$reason" == CARRIER ]
then
if [[ $3 -le $2 ]]
then
$1 $3
else
$1 $2
fi
fi
if [ "$reason" == NOCARRIER ]
then
$1 $2
fi
}
mtu(){
mtu_limit mtu_wg_blatto 1432 $(( $1 - 60 ))
}
conntrack_hack(){
if [ "$reason" == CARRIER ]
then
......@@ -62,9 +83,10 @@ then
if [ "$ifssid" == CDWiFi ]
then
mtu 1340
if [ "$reason" == BOUND ]
then
systemctl restart cdwifi-autologin
CDWIFI_IFACE=$interface cdwifi-autologin
fi
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment