Commit c0d5a6ff authored by nanahira's avatar nanahira

rev

parent 942a98aa
......@@ -27,10 +27,10 @@ handle_gateway() {
GATEWAY_NO_ORIGIN=$4
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
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
if [[ "$GATEWAY_ADDRESS" -eq "_use_last" ]]; then
GATEWAY_ADDRESS=$(subnetcalc "$BRIDGE_IP" -n | grep "Host Range" | awk '{print $7}')
fi
ip route add default via "$GATEWAY_ADDRESS" table "$GATEWAY_NEXT_HOP_MARK"
......
......@@ -19,10 +19,10 @@ handle_gateway() {
GATEWAY_NO_ORIGIN=$4
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
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
if [[ "$GATEWAY_ADDRESS" -eq "_use_last" ]]; then
GATEWAY_ADDRESS=$(subnetcalc "$BRIDGE_IP" -n | grep "Host Range" | awk '{print $7}')
fi
......
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