cni
cni copied to clipboard
bridge: adding route without gw, creates still gateway route?
{
"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
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?
Done
https://github.com/containernetworking/plugins/issues/273#issue-418035410
Are you sure? Does not seem anyone is monitoring there?