Commit d28267b2 authored by nanahira's avatar nanahira

fix

parent 13ed444c
......@@ -17,6 +17,13 @@ handle_gateway() {
GATEWAY_ADDRESS=$2
GATEWAY_MAC=$3
GATEWAY_NEXT_HOP_MARK=$[$GATEWAY_ID + 1100]
BRIDGE_IP=$(ip -4 addr show dev "$BRIDGE_NAME" | grep 'inet ' | awk '{print $2}')
if [[ "$GATEWAY_ADDRESS" -eq "_use_first" ]]; then
GATEWAY_ADDRESS=$(subnetcalc "$BRIDGE_IP" -n | grep "Host Range" | awk '{print $5}')
fi
if [[ "$GATEWAY_ADDRESS" -eq "_use_last" ]]; then
GATEWAY_ADDRESS=$(subnetcalc "$BRIDGE_IP" -n | grep "Host Range" | awk '{print $7}')
fi
ip rule del pref 100 fwmark "$GATEWAY_NEXT_HOP_MARK" lookup "$GATEWAY_NEXT_HOP_MARK"
eth_origin -D "$BRIDGE_NAME" "$GATEWAY_ID" "$GATEWAY_ADDRESS" "$GATEWAY_MAC"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment