[proxy] Add support for WEAVE_CIDR=none

Tells the proxy not to do anything with this container. We set it when
running weaveexec/weave/etc containers, so that the weave script works
through the proxy.
This commit is contained in:
Paul Bellamy committed 2015-06-17 14:51:12 +01:00
1 parent ff838a14d9
commit ca681bce13
8 files changed
+44 -15

No files matched your search

+2 -2
View File
@@ -21,8 +21,8 @@ func (i *startContainerInterceptor) InterceptResponse(r *http.Response) error {
return err
}
cidrs, ok := weaveCIDRsFromConfig(container.Config)
if !ok && i.proxy.NoDefaultIPAM {
cidrs, ok := weaveCIDRsFromConfig(container.Config, i.proxy.NoDefaultIPAM)
if !ok {
Debug.Print("No Weave CIDR, ignoring")
return nil
}