Check loopback and link-local multicast endpoints

Previously we just disallowed link-local (unicast).  This disallows loopback
and link-local multicast.
This commit is contained in:
Tim Hockin
2015-07-03 21:05:15 -07:00
parent b5a4a548df
commit 86f4535871
7 changed files with 47 additions and 16 deletions

View File

@@ -264,8 +264,9 @@ func (s *APIServer) Run(_ []string) error {
s.verifyClusterIPFlags()
// If advertise-address is not specified, use bind-address. If bind-address
// is also unset (or 0.0.0.0), setDefaults() in pkg/master/master.go will
// do the right thing and use the host's default interface.
// is not usable (unset, 0.0.0.0, or loopback), setDefaults() in
// pkg/master/master.go will do the right thing and use the host's default
// interface.
if s.AdvertiseAddress == nil || s.AdvertiseAddress.IsUnspecified() {
s.AdvertiseAddress = s.BindAddress
}