@@ -190,7 +190,7 @@ type nodePortWatcher struct {
190190 gatewayIPv6 string
191191 gatewayIPLock sync.Mutex
192192 ofportPhys string
193- gwBridge string
193+ gwBridge * bridgeconfig. BridgeConfiguration
194194 // Map of service name to programmed iptables/OF rules
195195 serviceInfo map [ktypes.NamespacedName ]* serviceConfig
196196 serviceInfoLock sync.Mutex
@@ -216,9 +216,9 @@ type cidrAndFlags struct {
216216 validLifetime int
217217}
218218
219- func (npw * nodePortWatcher ) updateGatewayIPs (addressManager * addressManager ) {
219+ func (npw * nodePortWatcher ) updateGatewayIPs () {
220220 // Get Physical IPs of Node, Can be IPV4 IPV6 or both
221- gatewayIPv4 , gatewayIPv6 := getGatewayFamilyAddrs (addressManager . gatewayBridge .GetIPs ())
221+ gatewayIPv4 , gatewayIPv6 := getGatewayFamilyAddrs (npw . gwBridge .GetIPs ())
222222
223223 npw .gatewayIPLock .Lock ()
224224 defer npw .gatewayIPLock .Unlock ()
@@ -368,7 +368,7 @@ func (npw *nodePortWatcher) updateServiceFlowCache(service *corev1.Service, netI
368368 var ofPorts []string
369369 // don't get the ports unless we need to as it is a costly operation
370370 if (len (extParsedIPs ) > 0 || len (ingParsedIPs ) > 0 ) && add {
371- ofPorts , err = util .GetOpenFlowPorts (npw .gwBridge , false )
371+ ofPorts , err = util .GetOpenFlowPorts (npw .gwBridge . GetGatewayIface () , false )
372372 if err != nil {
373373 // in the odd case that getting all ports from the bridge should not work,
374374 // simply output to LOCAL (this should work well in the vast majority of cases, anyway)
@@ -1517,7 +1517,7 @@ func newGateway(
15171517 }
15181518 if gw .nodePortWatcher != nil {
15191519 npw , _ := gw .nodePortWatcher .(* nodePortWatcher )
1520- npw .updateGatewayIPs (gw . nodeIPManager )
1520+ npw .updateGatewayIPs ()
15211521 }
15221522 // Services create OpenFlow flows as well, need to update them all
15231523 if gw .servicesRetryFramework != nil {
@@ -1624,7 +1624,7 @@ func newNodePortWatcher(
16241624 gatewayIPv4 : gatewayIPv4 ,
16251625 gatewayIPv6 : gatewayIPv6 ,
16261626 ofportPhys : ofportPhys ,
1627- gwBridge : gwBridge . GetGatewayIface () ,
1627+ gwBridge : gwBridge ,
16281628 serviceInfo : make (map [ktypes.NamespacedName ]* serviceConfig ),
16291629 nodeIPManager : nodeIPManager ,
16301630 ofm : ofm ,
0 commit comments