Commit 95c63088 authored by nanahira's avatar nanahira

use replace

parent 18da5fa4
......@@ -35,7 +35,7 @@ handle_gateway() {
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"
ip route replace default via "$GATEWAY_ADDRESS" table "$GATEWAY_NEXT_HOP_MARK"
{% if br.type != "dhcp" %}
ip route add default via "$GATEWAY_ADDRESS" metric "$GATEWAY_NEXT_HOP_MARK"
{% endif %}
......
......@@ -16,7 +16,7 @@ ip6tables -t mangle -A FORWARD -i "$PPP_IFACE" -p tcp -m tcp --tcp-flags SYN,RST
iptables -t nat -o "$PPP_IFACE" -A POSTROUTING -j MASQUERADE
ip route add default dev "$PPP_IFACE" table $PPPOE_NEXT_HOP_MARK
ip route replace default dev "$PPP_IFACE" table $PPPOE_NEXT_HOP_MARK
ip route add default dev "$PPP_IFACE" metric $PPPOE_NEXT_HOP_MARK
ip rule add pref 100 fwmark $PPPOE_NEXT_HOP_MARK lookup $PPPOE_NEXT_HOP_MARK
ip rule add pref 400 fwmark $PPPOE_SELECTION_MARK lookup $PPPOE_NEXT_HOP_MARK
......
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