|
@@ -0,0 +1,44 @@
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+package network
|
|
|
+
|
|
|
+import (
|
|
|
+ "github.com/coreos/flannel/pkg/ip"
|
|
|
+ "github.com/coreos/flannel/subnet"
|
|
|
+)
|
|
|
+
|
|
|
+type IPTables interface {
|
|
|
+ AppendUnique(table string, chain string, rulespec ...string) error
|
|
|
+ Delete(table string, chain string, rulespec ...string) error
|
|
|
+ Exists(table string, chain string, rulespec ...string) (bool, error)
|
|
|
+}
|
|
|
+
|
|
|
+type IPTablesRule struct {
|
|
|
+ table string
|
|
|
+ chain string
|
|
|
+ rulespec []string
|
|
|
+}
|
|
|
+
|
|
|
+func MasqRules(ipn ip.IP4Net, lease *subnet.Lease) []IPTablesRule {
|
|
|
+ return nil
|
|
|
+}
|
|
|
+
|
|
|
+func ForwardRules(flannelNetwork string) []IPTablesRule {
|
|
|
+ return nil
|
|
|
+}
|
|
|
+
|
|
|
+func SetupAndEnsureIPTables(rules []IPTablesRule) {
|
|
|
+
|
|
|
+}
|