ipvlan/macvlan: remove ipMasq related code
authorStefan Junker <mail@stefanjunker.de>
Wed, 9 Sep 2015 12:02:51 +0000 (14:02 +0200)
committerStefan Junker <mail@stefanjunker.de>
Wed, 9 Sep 2015 12:16:39 +0000 (14:16 +0200)
Luckily the docs haven't mentioned support for ipMasq for both plugins so far.
Even if anyone has attempted to enable the feature in their configuration files it didn't have the desired effect for the network.

plugins/main/ipvlan/ipvlan.go
plugins/main/macvlan/macvlan.go

index fe4fc79..65e37b4 100644 (file)
@@ -32,7 +32,6 @@ type NetConf struct {
        plugin.NetConf
        Master string `json:"master"`
        Mode   string `json:"mode"`
-       IPMasq bool   `json:"ipMasq"`
        MTU    int    `json:"mtu"`
 }
 
@@ -138,13 +137,6 @@ func cmdAdd(args *skel.CmdArgs) error {
                return err
        }
 
-       if n.IPMasq {
-               chain := "CNI-" + n.Name
-               if err = ip.SetupIPMasq(ip.Network(&result.IP4.IP), chain); err != nil {
-                       return err
-               }
-       }
-
        return result.Print()
 }
 
index 5dd9b6c..236693e 100644 (file)
@@ -32,7 +32,6 @@ type NetConf struct {
        plugin.NetConf
        Master string `json:"master"`
        Mode   string `json:"mode"`
-       IPMasq bool   `json:"ipMasq"`
        MTU    int    `json:"mtu"`
 }
 
@@ -142,13 +141,6 @@ func cmdAdd(args *skel.CmdArgs) error {
                return err
        }
 
-       if n.IPMasq {
-               chain := "CNI-" + n.Name
-               if err = ip.SetupIPMasq(ip.Network(&result.IP4.IP), chain); err != nil {
-                       return err
-               }
-       }
-
        return result.Print()
 }