Browse Source

feature/featuretags: make bird depend on advertiseroutes

Updates #cleanup

Change-Id: I87082919064a5652c0d976cadd6d159787bb224a
Signed-off-by: Brad Fitzpatrick <[email protected]>
Brad Fitzpatrick 4 months ago
parent
commit
0f4dec928e
2 changed files with 6 additions and 2 deletions
  1. 5 1
      feature/featuretags/featuretags.go
  2. 1 1
      wgengine/userspace.go

+ 5 - 1
feature/featuretags/featuretags.go

@@ -113,7 +113,11 @@ var Features = map[FeatureTag]FeatureMeta{
 		},
 		},
 	},
 	},
 	"bakedroots": {Sym: "BakedRoots", Desc: "Embed CA (LetsEncrypt) x509 roots to use as fallback"},
 	"bakedroots": {Sym: "BakedRoots", Desc: "Embed CA (LetsEncrypt) x509 roots to use as fallback"},
-	"bird":       {Sym: "Bird", Desc: "Bird BGP integration"},
+	"bird": {
+		Sym:  "Bird",
+		Desc: "Bird BGP integration",
+		Deps: []FeatureTag{"advertiseroutes"},
+	},
 	"c2n": {
 	"c2n": {
 		Sym:                  "C2N",
 		Sym:                  "C2N",
 		Desc:                 "Control-to-node (C2N) support",
 		Desc:                 "Control-to-node (C2N) support",

+ 1 - 1
wgengine/userspace.go

@@ -962,7 +962,7 @@ func (e *userspaceEngine) Reconfig(cfg *wgcfg.Config, routerCfg *router.Config,
 			nm.SelfNode.PrimaryRoutes(), nm.SelfNode.Hostinfo().RoutableIPs(),
 			nm.SelfNode.PrimaryRoutes(), nm.SelfNode.Hostinfo().RoutableIPs(),
 			isSubnetRouter, isSubnetRouter, e.lastIsSubnetRouter)
 			isSubnetRouter, isSubnetRouter, e.lastIsSubnetRouter)
 	}
 	}
-	isSubnetRouterChanged := isSubnetRouter != e.lastIsSubnetRouter
+	isSubnetRouterChanged := buildfeatures.HasAdvertiseRoutes && isSubnetRouter != e.lastIsSubnetRouter
 
 
 	engineChanged := checkchange.Update(&e.lastEngineFull, cfg)
 	engineChanged := checkchange.Update(&e.lastEngineFull, cfg)
 	routerChanged := checkchange.Update(&e.lastRouter, routerCfg)
 	routerChanged := checkchange.Update(&e.lastRouter, routerCfg)