Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bridge: adding route without gw, creates still gateway route? #629

Open
f1-outsourcing opened this issue Feb 24, 2019 · 3 comments
Open

Comments

@f1-outsourcing
Copy link

{
  "name" : "test-bridge",
  "type" : "bridge",
  "bridge": "test-br0",
  "isGateway": false,
  "ipMasq": false,
  "ipam": {
    "type": "host-local",
    "subnet": "192.168.122.0/24",
    "rangeStart": "192.168.122.171",
    "rangeEnd": "192.168.122.179",
    "routes": [
        { "dst": "192.168.10.153/32" }
    ]
  }
}

[@m03 mesos-cni]# CNI_PATH="/usr/libexec/cni/" NETCONFPATH="/etc/mesos-cni" cnitool-0.6.0 add test-bridge /var/run/netns/testing
{
    "cniVersion": "0.2.0",
    "ip4": {
        "ip": "192.168.122.177/24",
        "gateway": "192.168.122.1",
        "routes": [
            {
                "dst": "192.168.10.153/32",
                "gw": "192.168.122.1"
            }
        ]
    },
    "dns": {}
}

creates these routes

[@m03 ~]# ip netns exec testing ip route
192.168.10.153 via 192.168.122.1 dev eth0
192.168.122.0/24 dev eth0 proto kernel scope link src 192.168.122.177

I would like to know how I can add a route that is the equivalent of

ip route add 192.168.10.153/32 dev eth0

[@m03 ~]# ip netns exec testing ip route
192.168.10.153 dev eth0 scope link
192.168.122.0/24 dev eth0 proto kernel scope link src 192.168.122.177
@squeed
Copy link
Member

squeed commented Mar 6, 2019

Hi there,
That's a good point; with isGateway false, we should not be setting the gateway.

Would you mind re-filing this issue against the plugins repository? It's a bug in the bridge plugin. Do you think you'll be able to fix this?

@f1-outsourcing
Copy link
Author

@f1-outsourcing f1-outsourcing changed the title adding route without gw, creates still gateway route? bridge: adding route without gw, creates still gateway route? Mar 9, 2019
@f1-outsourcing
Copy link
Author

Are you sure? Does not seem anyone is monitoring there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants