Allow iptables -w to output busy spin message

This commit is contained in:
Mygod
2018-12-14 02:00:31 +08:00
parent b2346dca9a
commit f26716051c
2 changed files with 11 additions and 7 deletions

View File

@@ -53,9 +53,9 @@ class Routing(val downstream: String, ownerAddress: InterfaceAddress? = null) {
}
fun RootSession.Transaction.iptablesAdd(content: String, table: String = "filter") =
exec("$IPTABLES -t $table -A $content", "$IPTABLES -t $table -D $content")
exec("$IPTABLES -t $table -A $content", "$IPTABLES -t $table -D $content", true)
fun RootSession.Transaction.iptablesInsert(content: String, table: String = "filter") =
exec("$IPTABLES -t $table -I $content", "$IPTABLES -t $table -D $content")
exec("$IPTABLES -t $table -I $content", "$IPTABLES -t $table -D $content", true)
}
class InterfaceNotFoundException : SocketException() {