Repository: metallb/metallb
Pull request #2233 (2024-01-09 15:54:31)

BGP: move the session matching logic one level above
Sending all the advertisements to the session just to filter them after is counterintuitive. One would expect all of them to be processed. It's much better (and readable) to filter them from the calling site, before passing them to the session.

Also, removing all the *selector* tests from frr and frr-k8s since they do not make sense as the logic is happening above.


Patch:
diff --git a/internal/bgp/frr/frr.go b/internal/bgp/frr/frr.go
index 3229fd01..ac8b6992 100644
--- a/internal/bgp/frr/frr.go
+++ b/internal/bgp/frr/frr.go
@@ -272,10 +272,6 @@ func (sm *sessionManager) createConfig() (*frrConfig, error) {
 		}
 
 		for _, adv := range s.advertised {
-			if !adv.MatchesPeer(s.SessionName) {
-				continue
-			}
-
 			family := ipfamily.ForAddress(adv.Prefix.IP)
 
 			communities := make([]string, 0)
diff --git a/internal/bgp/frrk8s/frrk8s.go b/internal/bgp/frrk8s/frrk8s.go
index e4e1c49a..f721faf6 100644
--- a/internal/bgp/frrk8s/frrk8s.go
+++ b/internal/bgp/frrk8s/frrk8s.go
@@ -271,10 +271,6 @@ func (sm *sessionManager) updateConfig() error {
 		prefixesForCommunity := map[string][]string{}
 		prefixesForLocalPref := map[uint32][]string{}
 		for _, adv := range s.advertised {
-			if !adv.MatchesPeer(s.SessionName) {
-				continue
-			}
-
 			prefix := adv.Prefix.String()
 			neighbor.ToAdvertise.Allowed.Prefixes = append(neighbor.ToAdvertise.Allowed.Prefixes, prefix)
 			rout.prefixes[prefix] = prefix
diff --git a/internal/bgp/native/native.go b/internal/bgp/native/native.go
index 35e8535d..5d1956cf 100644
--- a/internal/bgp/native/native.go
+++ b/internal/bgp/native/native.go
@@ -457,9 +457,6 @@ func (s *session) Set(advs ...*bgp.Advertisement) error {
 
 	newAdvs := map[string]*bgp.Advertisement{}
 	for _, adv := range advs {
-		if !adv.MatchesPeer(s.SessionName) {
-			continue
-		}
 		err := validate(adv)
 		if err != nil {
 			return err
diff --git a/speaker/bgp_controller.go b/speaker/bgp_controller.go
index e991a469..204e6e40 100644
--- a/speaker/bgp_controller.go
+++ b/speaker/bgp_controller.go
@@ -335,13 +335,27 @@ func (c *bgpController) updateAds() error {
 		if peer.session == nil {
 			continue
 		}
-		if err := peer.session.Set(allAds...); err != nil {
+		ads := adsForPeer(peer.cfg.Name, allAds)
+		if err := peer.session.Set(ads...); err != nil {
 			return err
 		}
 	}
 	return nil
 }
 
+func adsForPeer(peerName string, ads []*bgp.Advertisement) []*bgp.Advertisement {
+	res := []*bgp.Advertisement{}
+	for _, a := range ads {
+		if a.MatchesPeer(peerName) {
+			res = append(res, a)
+		}
+	}
+	if len(res) == 0 {
+		return nil
+	}
+	return res
+}
+
 func (c *bgpController) DeleteBalancer(l log.Logger, name, reason string) error {
 	if _, ok := c.svcAds[name]; !ok {
 		return nil
diff --git a/website/content/release-notes/_index.md b/website/content/release-notes/_index.md
index 38a28387..474a6f2b 100644
--- a/website/content/release-notes/_index.md
+++ b/website/content/release-notes/_index.md
@@ -22,6 +22,7 @@ Chores:
 - Metrics: add ipv4/6 addresses_in_use_total and addresses_total ([PR 2151](https://github.com/metallb/metallb/pull/2151))
 - Squash the prefixes in FRR mode, avoiding duplicate prefixes in the FRR configuration ([PR 2234](https://github.com/metallb/metallb/pull/2234))
 
+- BGP: move the matching peer logic one level up ([PR 2233](https://github.com/metallb/metallb/pull/2233))
 
 ## Version 0.13.12
 


Test patch:
diff --git a/internal/bgp/frr/frr_test.go b/internal/bgp/frr/frr_test.go
index 6d3bc658..af093b1a 100644
--- a/internal/bgp/frr/frr_test.go
+++ b/internal/bgp/frr/frr_test.go
@@ -677,103 +677,6 @@ func TestSingleAdvertisementChange(t *testing.T) {
 	testCheckConfigFile(t)
 }
 
-func TestSingleAdvertisementWithPeerSelector(t *testing.T) {
-	testSetup(t)
-
-	l := log.NewNopLogger()
-	sessionManager := mockNewSessionManager(l, logging.LevelInfo)
-	defer close(sessionManager.reloadConfig)
-
-	session, err := sessionManager.NewSession(l,
-		bgp.SessionParameters{
-			PeerAddress:   "10.2.2.254:179",
-			SourceAddress: net.ParseIP("10.1.1.254"),
-			MyASN:         100,
-			RouterID:      net.ParseIP("10.1.1.254"),
-			PeerASN:       200,
-			HoldTime:      time.Second,
-			KeepAliveTime: time.Second,
-			Password:      "password",
-			CurrentNode:   "hostname",
-			EBGPMultiHop:  true,
-			SessionName:   "test-peer"})
-	if err != nil {
-		t.Fatalf("Could not create session: %s", err)
-	}
-	defer session.Close()
-
-	prefix := &net.IPNet{
-		IP:   net.ParseIP("172.16.1.10"),
-		Mask: classCMask,
-	}
-	communities := []community.BGPCommunity{}
-	community1, _ := community.New("1111:2222")
-	communities = append(communities, community1)
-	community2, _ := community.New("3333:4444")
-	communities = append(communities, community2)
-	adv := &bgp.Advertisement{
-		Prefix:      prefix,
-		Communities: communities,
-		LocalPref:   300,
-		Peers:       []string{"test-peer"},
-	}
-
-	err = session.Set(adv)
-	if err != nil {
-		t.Fatalf("Could not advertise prefix: %s", err)
-	}
-
-	testCheckConfigFile(t)
-}
-
-func TestSingleAdvertisementNonExistingPeer(t *testing.T) {
-	testSetup(t)
-
-	l := log.NewNopLogger()
-	sessionManager := mockNewSessionManager(l, logging.LevelInfo)
-	defer close(sessionManager.reloadConfig)
-	session, err := sessionManager.NewSession(l,
-		bgp.SessionParameters{
-			PeerAddress:   "10.2.2.254:179",
-			SourceAddress: net.ParseIP("10.1.1.254"),
-			MyASN:         100,
-			RouterID:      net.ParseIP("10.1.1.254"),
-			PeerASN:       200,
-			HoldTime:      time.Second,
-			KeepAliveTime: time.Second,
-			Password:      "password",
-			CurrentNode:   "hostname",
-			EBGPMultiHop:  true,
-			SessionName:   "test-peer"})
-	if err != nil {
-		t.Fatalf("Could not create session: %s", err)
-	}
-	defer session.Close()
-
-	prefix := &net.IPNet{
-		IP:   net.ParseIP("172.16.1.10"),
-		Mask: classCMask,
-	}
-	communities := []community.BGPCommunity{}
-	community1, _ := community.New("1111:2222")
-	communities = append(communities, community1)
-	community2, _ := community.New("3333:4444")
-	communities = append(communities, community2)
-	adv := &bgp.Advertisement{
-		Prefix:      prefix,
-		Communities: communities,
-		LocalPref:   300,
-		Peers:       []string{"peer1"},
-	}
-
-	err = session.Set(adv)
-	if err != nil {
-		t.Fatalf("Could not advertise prefix: %s", err)
-	}
-
-	testCheckConfigFile(t)
-}
-
 func TestTwoAdvertisements(t *testing.T) {
 	testSetup(t)
 
@@ -970,84 +873,6 @@ func TestTwoAdvertisementsTwoSessions(t *testing.T) {
 	validateAgainstFRR(t)
 }
 
-func TestTwoAdvertisementsTwoSessionsOneWithPeerSelector(t *testing.T) {
-	testSetup(t)
-
-	l := log.NewNopLogger()
-	sessionManager := mockNewSessionManager(l, logging.LevelInfo)
-	defer close(sessionManager.reloadConfig)
-	session, err := sessionManager.NewSession(l,
-		bgp.SessionParameters{
-			PeerAddress:   "10.2.2.254:179",
-			SourceAddress: net.ParseIP("10.1.1.254"),
-			MyASN:         100,
-			RouterID:      net.ParseIP("10.1.1.254"),
-			PeerASN:       200,
-			HoldTime:      time.Second,
-			KeepAliveTime: time.Second,
-			Password:      "password",
-			CurrentNode:   "hostname",
-			EBGPMultiHop:  true,
-			SessionName:   "test-peer"})
-	if err != nil {
-		t.Fatalf("Could not create session: %s", err)
-	}
-	defer session.Close()
-
-	session1, err := sessionManager.NewSession(l,
-		bgp.SessionParameters{
-			PeerAddress:   "10.2.2.255:179",
-			SourceAddress: net.ParseIP("10.1.1.254"),
-			MyASN:         100,
-			RouterID:      net.ParseIP("10.1.1.254"),
-			PeerASN:       200,
-			HoldTime:      time.Second,
-			KeepAliveTime: time.Second,
-			Password:      "password",
-			CurrentNode:   "hostname",
-			EBGPMultiHop:  true,
-			SessionName:   "test-peer1"})
-	if err != nil {
-		t.Fatalf("Could not create session: %s", err)
-	}
-	defer session1.Close()
-
-	prefix1 := &net.IPNet{
-		IP:   net.ParseIP("172.16.1.10"),
-		Mask: classCMask,
-	}
-	communities := []community.BGPCommunity{}
-	community, _ := community.New("1111:2222")
-	communities = append(communities, community)
-	adv1 := &bgp.Advertisement{
-		Prefix:      prefix1,
-		Communities: communities,
-		Peers:       []string{"test-peer"},
-	}
-
-	prefix2 := &net.IPNet{
-		IP:   net.ParseIP("172.16.1.11"),
-		Mask: classCMask,
-	}
-
-	adv2 := &bgp.Advertisement{
-		Prefix:      prefix2,
-		Communities: communities,
-		LocalPref:   2,
-	}
-
-	err = session.Set(adv1, adv2)
-	if err != nil {
-		t.Fatalf("Could not advertise prefix: %s", err)
-	}
-	err = session1.Set(adv1, adv2)
-	if err != nil {
-		t.Fatalf("Could not advertise prefix: %s", err)
-	}
-
-	testCheckConfigFile(t)
-}
-
 func TestSingleSessionExtras(t *testing.T) {
 	testSetup(t)
 
diff --git a/internal/bgp/frr/frr_vrf_test.go b/internal/bgp/frr/frr_vrf_test.go
index d092aef0..f52bdaa4 100644
--- a/internal/bgp/frr/frr_vrf_test.go
+++ b/internal/bgp/frr/frr_vrf_test.go
@@ -311,56 +311,6 @@ func TestSingleAdvertisementChangeVRF(t *testing.T) {
 	testCheckConfigFile(t)
 }
 
-func TestSingleAdvertisementWithPeerSelectorVRF(t *testing.T) {
-	testSetup(t)
-
-	l := log.NewNopLogger()
-	sessionManager := mockNewSessionManager(l, logging.LevelInfo)
-	defer close(sessionManager.reloadConfig)
-
-	session, err := sessionManager.NewSession(l,
-		bgp.SessionParameters{
-			PeerAddress:   "10.2.2.254:179",
-			SourceAddress: net.ParseIP("10.1.1.254"),
-			MyASN:         100,
-			RouterID:      net.ParseIP("10.1.1.254"),
-			PeerASN:       200,
-			HoldTime:      time.Second,
-			KeepAliveTime: time.Second,
-			Password:      "password",
-			CurrentNode:   "hostname",
-			EBGPMultiHop:  false,
-			SessionName:   "test-peer",
-			VRFName:       "red"})
-	if err != nil {
-		t.Fatalf("Could not create session: %s", err)
-	}
-	defer session.Close()
-
-	prefix := &net.IPNet{
-		IP:   net.ParseIP("172.16.1.10"),
-		Mask: classCMask,
-	}
-	communities := []community.BGPCommunity{}
-	community1, _ := community.New("1111:2222")
-	communities = append(communities, community1)
-	community2, _ := community.New("3333:4444")
-	communities = append(communities, community2)
-	adv := &bgp.Advertisement{
-		Prefix:      prefix,
-		Communities: communities,
-		LocalPref:   300,
-		Peers:       []string{"test-peer"},
-	}
-
-	err = session.Set(adv)
-	if err != nil {
-		t.Fatalf("Could not advertise prefix: %s", err)
-	}
-
-	testCheckConfigFile(t)
-}
-
 func TestTwoAdvertisementsVRF(t *testing.T) {
 	testSetup(t)
 
@@ -492,165 +442,3 @@ func TestTwoAdvertisementsTwoSessionsOneVRF(t *testing.T) {
 
 	testCheckConfigFile(t)
 }
-
-func TestTwoAdvertisementsTwoSessionsOneWithPeerSelectorAndVRF(t *testing.T) {
-	testSetup(t)
-
-	l := log.NewNopLogger()
-	sessionManager := mockNewSessionManager(l, logging.LevelInfo)
-	defer close(sessionManager.reloadConfig)
-	session, err := sessionManager.NewSession(l,
-		bgp.SessionParameters{
-			PeerAddress:   "10.2.2.254:179",
-			SourceAddress: net.ParseIP("10.1.1.254"),
-			MyASN:         100,
-			RouterID:      net.ParseIP("10.1.1.254"),
-			PeerASN:       200,
-			HoldTime:      time.Second,
-			KeepAliveTime: time.Second,
-			Password:      "password",
-			CurrentNode:   "hostname",
-			EBGPMultiHop:  false,
-			SessionName:   "test-peer",
-			VRFName:       "red"})
-	if err != nil {
-		t.Fatalf("Could not create session: %s", err)
-	}
-	defer session.Close()
-
-	session1, err := sessionManager.NewSession(l,
-		bgp.SessionParameters{
-			PeerAddress:   "10.2.2.255:179",
-			SourceAddress: net.ParseIP("10.1.1.254"),
-			MyASN:         100,
-			RouterID:      net.ParseIP("10.1.1.254"),
-			PeerASN:       200,
-			HoldTime:      time.Second,
-			KeepAliveTime: time.Second,
-			Password:      "password",
-			CurrentNode:   "hostname",
-			EBGPMultiHop:  false,
-			SessionName:   "test-peer1",
-		})
-	if err != nil {
-		t.Fatalf("Could not create session: %s", err)
-	}
-	defer session1.Close()
-
-	prefix1 := &net.IPNet{
-		IP:   net.ParseIP("172.16.1.10"),
-		Mask: classCMask,
-	}
-	communities := []community.BGPCommunity{}
-	community, _ := community.New("1111:2222")
-	communities = append(communities, community)
-	adv1 := &bgp.Advertisement{
-		Prefix:      prefix1,
-		Communities: communities,
-		Peers:       []string{"test-peer"},
-	}
-
-	prefix2 := &net.IPNet{
-		IP:   net.ParseIP("172.16.1.11"),
-		Mask: classCMask,
-	}
-
-	adv2 := &bgp.Advertisement{
-		Prefix:      prefix2,
-		Communities: communities,
-		LocalPref:   2,
-	}
-
-	err = session.Set(adv1, adv2)
-	if err != nil {
-		t.Fatalf("Could not advertise prefix: %s", err)
-	}
-	err = session1.Set(adv1, adv2)
-	if err != nil {
-		t.Fatalf("Could not advertise prefix: %s", err)
-	}
-
-	testCheckConfigFile(t)
-}
-
-func TestTwoAdvertisementsTwoSessionsVRFWithPeerSelector(t *testing.T) {
-	testSetup(t)
-
-	l := log.NewNopLogger()
-	sessionManager := mockNewSessionManager(l, logging.LevelInfo)
-	defer close(sessionManager.reloadConfig)
-	session, err := sessionManager.NewSession(l,
-		bgp.SessionParameters{
-			PeerAddress:   "10.2.2.254:179",
-			SourceAddress: net.ParseIP("10.1.1.254"),
-			MyASN:         100,
-			RouterID:      net.ParseIP("10.1.1.254"),
-			PeerASN:       200,
-			HoldTime:      time.Second,
-			KeepAliveTime: time.Second,
-			Password:      "password",
-			CurrentNode:   "hostname",
-			EBGPMultiHop:  false,
-			SessionName:   "test-peer",
-			VRFName:       "red"})
-	if err != nil {
-		t.Fatalf("Could not create session: %s", err)
-	}
-	defer session.Close()
-
-	session1, err := sessionManager.NewSession(l,
-		bgp.SessionParameters{
-			PeerAddress:   "10.2.2.255:179",
-			SourceAddress: net.ParseIP("10.1.1.254"),
-			MyASN:         100,
-			RouterID:      net.ParseIP("10.1.1.254"),
-			PeerASN:       200,
-			HoldTime:      time.Second,
-			KeepAliveTime: time.Second,
-			Password:      "password",
-			CurrentNode:   "hostname",
-			EBGPMultiHop:  false,
-			SessionName:   "test-peer1",
-			VRFName:       "blue",
-		})
-	if err != nil {
-		t.Fatalf("Could not create session: %s", err)
-	}
-	defer session1.Close()
-
-	prefix1 := &net.IPNet{
-		IP:   net.ParseIP("172.16.1.10"),
-		Mask: classCMask,
-	}
-	communities := []community.BGPCommunity{}
-	community, _ := community.New("1111:2222")
-	communities = append(communities, community)
-	adv1 := &bgp.Advertisement{
-		Prefix:      prefix1,
-		Communities: communities,
-		Peers:       []string{"test-peer"},
-	}
-
-	prefix2 := &net.IPNet{
-		IP:   net.ParseIP("172.16.1.11"),
-		Mask: classCMask,
-	}
-
-	adv2 := &bgp.Advertisement{
-		Prefix:      prefix2,
-		Communities: communities,
-		LocalPref:   2,
-		Peers:       []string{"test-peer1"},
-	}
-
-	err = session.Set(adv1, adv2)
-	if err != nil {
-		t.Fatalf("Could not advertise prefix: %s", err)
-	}
-	err = session1.Set(adv1, adv2)
-	if err != nil {
-		t.Fatalf("Could not advertise prefix: %s", err)
-	}
-
-	testCheckConfigFile(t)
-}
diff --git a/internal/bgp/frr/testdata/TestSingleAdvertisementNonExistingPeer.golden b/internal/bgp/frr/testdata/TestSingleAdvertisementNonExistingPeer.golden
deleted file mode 100644
index 4c19a659..00000000
--- a/internal/bgp/frr/testdata/TestSingleAdvertisementNonExistingPeer.golden
+++ /dev/null
@@ -1,42 +0,0 @@
-log file /etc/frr/frr.log informational
-log timestamp precision 3
-hostname dummyhostname
-ip nht resolve-via-default
-ipv6 nht resolve-via-default
-route-map 10.2.2.254-in deny 20
-
-
-
-
-ip prefix-list 10.2.2.254-pl-ipv4 seq 1 deny any
-ipv6 prefix-list 10.2.2.254-pl-ipv4 seq 2 deny any
-
-route-map 10.2.2.254-out permit 1
-  match ip address prefix-list 10.2.2.254-pl-ipv4
-route-map 10.2.2.254-out permit 2
-  match ipv6 address prefix-list 10.2.2.254-pl-ipv4
-
-router bgp 100
-  no bgp ebgp-requires-policy
-  no bgp network import-check
-  no bgp default ipv4-unicast
-
-  bgp router-id 10.1.1.254
-  neighbor 10.2.2.254 remote-as 200
-  neighbor 10.2.2.254 ebgp-multihop
-  neighbor 10.2.2.254 port 179
-  neighbor 10.2.2.254 timers 1 1
-  neighbor 10.2.2.254 password password
-  neighbor 10.2.2.254 update-source 10.1.1.254
-
-  address-family ipv4 unicast
-    neighbor 10.2.2.254 activate
-    neighbor 10.2.2.254 route-map 10.2.2.254-in in
-    neighbor 10.2.2.254 route-map 10.2.2.254-out out
-  exit-address-family
-  address-family ipv6 unicast
-    neighbor 10.2.2.254 activate
-    neighbor 10.2.2.254 route-map 10.2.2.254-in in
-    neighbor 10.2.2.254 route-map 10.2.2.254-out out
-  exit-address-family
-
diff --git a/internal/bgp/frr/testdata/TestSingleAdvertisementWithPeerSelector.golden b/internal/bgp/frr/testdata/TestSingleAdvertisementWithPeerSelector.golden
deleted file mode 100644
index adc97c57..00000000
--- a/internal/bgp/frr/testdata/TestSingleAdvertisementWithPeerSelector.golden
+++ /dev/null
@@ -1,67 +0,0 @@
-log file /etc/frr/frr.log informational
-log timestamp precision 3
-hostname dummyhostname
-ip nht resolve-via-default
-ipv6 nht resolve-via-default
-route-map 10.2.2.254-in deny 20
-
-
-ip prefix-list 10.2.2.254-300-ipv4-localpref-prefixes seq 1 permit 172.16.1.10/24
-route-map 10.2.2.254-out permit 1
-  match ip address prefix-list 10.2.2.254-300-ipv4-localpref-prefixes
-  set local-preference 300
-  on-match next
-
-ip prefix-list 10.2.2.254-1111:2222-ipv4-community-prefixes seq 1 permit 172.16.1.10/24
-route-map 10.2.2.254-out permit 2
-  match ip address prefix-list 10.2.2.254-1111:2222-ipv4-community-prefixes
-  set community 1111:2222 additive
-  on-match next
-
-ip prefix-list 10.2.2.254-3333:4444-ipv4-community-prefixes seq 1 permit 172.16.1.10/24
-route-map 10.2.2.254-out permit 3
-  match ip address prefix-list 10.2.2.254-3333:4444-ipv4-community-prefixes
-  set community 3333:4444 additive
-  on-match next
-
-
- ip prefix-list 10.2.2.254-pl-ipv4 seq 1 permit 172.16.1.10/24
-
-
-
-
-ipv6 prefix-list 10.2.2.254-pl-ipv4 seq 2 deny any
-
-route-map 10.2.2.254-out permit 4
-  match ip address prefix-list 10.2.2.254-pl-ipv4
-route-map 10.2.2.254-out permit 5
-  match ipv6 address prefix-list 10.2.2.254-pl-ipv4
-
-router bgp 100
-  no bgp ebgp-requires-policy
-  no bgp network import-check
-  no bgp default ipv4-unicast
-
-  bgp router-id 10.1.1.254
-  neighbor 10.2.2.254 remote-as 200
-  neighbor 10.2.2.254 ebgp-multihop
-  neighbor 10.2.2.254 port 179
-  neighbor 10.2.2.254 timers 1 1
-  neighbor 10.2.2.254 password password
-  neighbor 10.2.2.254 update-source 10.1.1.254
-
-  address-family ipv4 unicast
-    neighbor 10.2.2.254 activate
-    neighbor 10.2.2.254 route-map 10.2.2.254-in in
-    neighbor 10.2.2.254 route-map 10.2.2.254-out out
-  exit-address-family
-  address-family ipv6 unicast
-    neighbor 10.2.2.254 activate
-    neighbor 10.2.2.254 route-map 10.2.2.254-in in
-    neighbor 10.2.2.254 route-map 10.2.2.254-out out
-  exit-address-family
-  address-family ipv4 unicast
-    network 172.16.1.10/24
-  exit-address-family
-
-
diff --git a/internal/bgp/frr/testdata/TestSingleAdvertisementWithPeerSelectorVRF.golden b/internal/bgp/frr/testdata/TestSingleAdvertisementWithPeerSelectorVRF.golden
deleted file mode 100644
index 9a1f7e2c..00000000
--- a/internal/bgp/frr/testdata/TestSingleAdvertisementWithPeerSelectorVRF.golden
+++ /dev/null
@@ -1,66 +0,0 @@
-log file /etc/frr/frr.log 
-log timestamp precision 3
-hostname dummyhostname
-ip nht resolve-via-default
-ipv6 nht resolve-via-default
-route-map 10.2.2.254-red-in deny 20
-
-
-ip prefix-list 10.2.2.254-red-300-ipv4-localpref-prefixes seq 1 permit 172.16.1.10/24
-route-map 10.2.2.254-red-out permit 1
-  match ip address prefix-list 10.2.2.254-red-300-ipv4-localpref-prefixes
-  set local-preference 300
-  on-match next
-
-ip prefix-list 10.2.2.254-red-1111:2222-ipv4-community-prefixes seq 1 permit 172.16.1.10/24
-route-map 10.2.2.254-red-out permit 2
-  match ip address prefix-list 10.2.2.254-red-1111:2222-ipv4-community-prefixes
-  set community 1111:2222 additive
-  on-match next
-
-ip prefix-list 10.2.2.254-red-3333:4444-ipv4-community-prefixes seq 1 permit 172.16.1.10/24
-route-map 10.2.2.254-red-out permit 3
-  match ip address prefix-list 10.2.2.254-red-3333:4444-ipv4-community-prefixes
-  set community 3333:4444 additive
-  on-match next
-
-
- ip prefix-list 10.2.2.254-red-pl-ipv4 seq 1 permit 172.16.1.10/24
-
-
-
-
-ipv6 prefix-list 10.2.2.254-red-pl-ipv4 seq 2 deny any
-
-route-map 10.2.2.254-red-out permit 4
-  match ip address prefix-list 10.2.2.254-red-pl-ipv4
-route-map 10.2.2.254-red-out permit 5
-  match ipv6 address prefix-list 10.2.2.254-red-pl-ipv4
-
-router bgp 100 vrf red
-  no bgp ebgp-requires-policy
-  no bgp network import-check
-  no bgp default ipv4-unicast
-
-  bgp router-id 10.1.1.254
-  neighbor 10.2.2.254 remote-as 200
-  neighbor 10.2.2.254 port 179
-  neighbor 10.2.2.254 timers 1 1
-  neighbor 10.2.2.254 password password
-  neighbor 10.2.2.254 update-source 10.1.1.254
-
-  address-family ipv4 unicast
-    neighbor 10.2.2.254 activate
-    neighbor 10.2.2.254 route-map 10.2.2.254-red-in in
-    neighbor 10.2.2.254 route-map 10.2.2.254-red-out out
-  exit-address-family
-  address-family ipv6 unicast
-    neighbor 10.2.2.254 activate
-    neighbor 10.2.2.254 route-map 10.2.2.254-red-in in
-    neighbor 10.2.2.254 route-map 10.2.2.254-red-out out
-  exit-address-family
-  address-family ipv4 unicast
-    network 172.16.1.10/24
-  exit-address-family
-
-
diff --git a/internal/bgp/frr/testdata/TestTwoAdvertisementsTwoSessionsOneWithPeerSelector.golden b/internal/bgp/frr/testdata/TestTwoAdvertisementsTwoSessionsOneWithPeerSelector.golden
deleted file mode 100644
index 87c8e7ae..00000000
--- a/internal/bgp/frr/testdata/TestTwoAdvertisementsTwoSessionsOneWithPeerSelector.golden
+++ /dev/null
@@ -1,116 +0,0 @@
-log file /etc/frr/frr.log informational
-log timestamp precision 3
-hostname dummyhostname
-ip nht resolve-via-default
-ipv6 nht resolve-via-default
-route-map 10.2.2.254-in deny 20
-
-
-ip prefix-list 10.2.2.254-1111:2222-ipv4-community-prefixes seq 1 permit 172.16.1.10/24
-route-map 10.2.2.254-out permit 1
-  match ip address prefix-list 10.2.2.254-1111:2222-ipv4-community-prefixes
-  set community 1111:2222 additive
-  on-match next
-
-
- ip prefix-list 10.2.2.254-pl-ipv4 seq 1 permit 172.16.1.10/24
-
-
-ip prefix-list 10.2.2.254-2-ipv4-localpref-prefixes seq 1 permit 172.16.1.11/24
-route-map 10.2.2.254-out permit 2
-  match ip address prefix-list 10.2.2.254-2-ipv4-localpref-prefixes
-  set local-preference 2
-  on-match next
-
-ip prefix-list 10.2.2.254-1111:2222-ipv4-community-prefixes seq 2 permit 172.16.1.11/24
-route-map 10.2.2.254-out permit 3
-  match ip address prefix-list 10.2.2.254-1111:2222-ipv4-community-prefixes
-  set community 1111:2222 additive
-  on-match next
-
-
- ip prefix-list 10.2.2.254-pl-ipv4 seq 2 permit 172.16.1.11/24
-
-
-
-
-ipv6 prefix-list 10.2.2.254-pl-ipv4 seq 3 deny any
-
-route-map 10.2.2.254-out permit 4
-  match ip address prefix-list 10.2.2.254-pl-ipv4
-route-map 10.2.2.254-out permit 5
-  match ipv6 address prefix-list 10.2.2.254-pl-ipv4
-route-map 10.2.2.255-in deny 20
-
-
-ip prefix-list 10.2.2.255-2-ipv4-localpref-prefixes seq 1 permit 172.16.1.11/24
-route-map 10.2.2.255-out permit 1
-  match ip address prefix-list 10.2.2.255-2-ipv4-localpref-prefixes
-  set local-preference 2
-  on-match next
-
-ip prefix-list 10.2.2.255-1111:2222-ipv4-community-prefixes seq 1 permit 172.16.1.11/24
-route-map 10.2.2.255-out permit 2
-  match ip address prefix-list 10.2.2.255-1111:2222-ipv4-community-prefixes
-  set community 1111:2222 additive
-  on-match next
-
-
- ip prefix-list 10.2.2.255-pl-ipv4 seq 1 permit 172.16.1.11/24
-
-
-
-
-ipv6 prefix-list 10.2.2.255-pl-ipv4 seq 2 deny any
-
-route-map 10.2.2.255-out permit 3
-  match ip address prefix-list 10.2.2.255-pl-ipv4
-route-map 10.2.2.255-out permit 4
-  match ipv6 address prefix-list 10.2.2.255-pl-ipv4
-
-router bgp 100
-  no bgp ebgp-requires-policy
-  no bgp network import-check
-  no bgp default ipv4-unicast
-
-  bgp router-id 10.1.1.254
-  neighbor 10.2.2.254 remote-as 200
-  neighbor 10.2.2.254 ebgp-multihop
-  neighbor 10.2.2.254 port 179
-  neighbor 10.2.2.254 timers 1 1
-  neighbor 10.2.2.254 password password
-  neighbor 10.2.2.254 update-source 10.1.1.254
-  neighbor 10.2.2.255 remote-as 200
-  neighbor 10.2.2.255 ebgp-multihop
-  neighbor 10.2.2.255 port 179
-  neighbor 10.2.2.255 timers 1 1
-  neighbor 10.2.2.255 password password
-  neighbor 10.2.2.255 update-source 10.1.1.254
-
-  address-family ipv4 unicast
-    neighbor 10.2.2.254 activate
-    neighbor 10.2.2.254 route-map 10.2.2.254-in in
-    neighbor 10.2.2.254 route-map 10.2.2.254-out out
-  exit-address-family
-  address-family ipv6 unicast
-    neighbor 10.2.2.254 activate
-    neighbor 10.2.2.254 route-map 10.2.2.254-in in
-    neighbor 10.2.2.254 route-map 10.2.2.254-out out
-  exit-address-family
-
-  address-family ipv4 unicast
-    neighbor 10.2.2.255 activate
-    neighbor 10.2.2.255 route-map 10.2.2.255-in in
-    neighbor 10.2.2.255 route-map 10.2.2.255-out out
-  exit-address-family
-  address-family ipv6 unicast
-    neighbor 10.2.2.255 activate
-    neighbor 10.2.2.255 route-map 10.2.2.255-in in
-    neighbor 10.2.2.255 route-map 10.2.2.255-out out
-  exit-address-family
-  address-family ipv4 unicast
-    network 172.16.1.10/24
-    network 172.16.1.11/24
-  exit-address-family
-
-
diff --git a/internal/bgp/frr/testdata/TestTwoAdvertisementsTwoSessionsOneWithPeerSelectorAndVRF.golden b/internal/bgp/frr/testdata/TestTwoAdvertisementsTwoSessionsOneWithPeerSelectorAndVRF.golden
deleted file mode 100644
index 36a8428a..00000000
--- a/internal/bgp/frr/testdata/TestTwoAdvertisementsTwoSessionsOneWithPeerSelectorAndVRF.golden
+++ /dev/null
@@ -1,124 +0,0 @@
-log file /etc/frr/frr.log 
-log timestamp precision 3
-hostname dummyhostname
-ip nht resolve-via-default
-ipv6 nht resolve-via-default
-route-map 10.2.2.255-in deny 20
-
-
-ip prefix-list 10.2.2.255-2-ipv4-localpref-prefixes seq 1 permit 172.16.1.11/24
-route-map 10.2.2.255-out permit 1
-  match ip address prefix-list 10.2.2.255-2-ipv4-localpref-prefixes
-  set local-preference 2
-  on-match next
-
-ip prefix-list 10.2.2.255-1111:2222-ipv4-community-prefixes seq 1 permit 172.16.1.11/24
-route-map 10.2.2.255-out permit 2
-  match ip address prefix-list 10.2.2.255-1111:2222-ipv4-community-prefixes
-  set community 1111:2222 additive
-  on-match next
-
-
- ip prefix-list 10.2.2.255-pl-ipv4 seq 1 permit 172.16.1.11/24
-
-
-
-
-ipv6 prefix-list 10.2.2.255-pl-ipv4 seq 2 deny any
-
-route-map 10.2.2.255-out permit 3
-  match ip address prefix-list 10.2.2.255-pl-ipv4
-route-map 10.2.2.255-out permit 4
-  match ipv6 address prefix-list 10.2.2.255-pl-ipv4
-route-map 10.2.2.254-red-in deny 20
-
-
-ip prefix-list 10.2.2.254-red-1111:2222-ipv4-community-prefixes seq 1 permit 172.16.1.10/24
-route-map 10.2.2.254-red-out permit 1
-  match ip address prefix-list 10.2.2.254-red-1111:2222-ipv4-community-prefixes
-  set community 1111:2222 additive
-  on-match next
-
-
- ip prefix-list 10.2.2.254-red-pl-ipv4 seq 1 permit 172.16.1.10/24
-
-
-ip prefix-list 10.2.2.254-red-2-ipv4-localpref-prefixes seq 1 permit 172.16.1.11/24
-route-map 10.2.2.254-red-out permit 2
-  match ip address prefix-list 10.2.2.254-red-2-ipv4-localpref-prefixes
-  set local-preference 2
-  on-match next
-
-ip prefix-list 10.2.2.254-red-1111:2222-ipv4-community-prefixes seq 2 permit 172.16.1.11/24
-route-map 10.2.2.254-red-out permit 3
-  match ip address prefix-list 10.2.2.254-red-1111:2222-ipv4-community-prefixes
-  set community 1111:2222 additive
-  on-match next
-
-
- ip prefix-list 10.2.2.254-red-pl-ipv4 seq 2 permit 172.16.1.11/24
-
-
-
-
-ipv6 prefix-list 10.2.2.254-red-pl-ipv4 seq 3 deny any
-
-route-map 10.2.2.254-red-out permit 4
-  match ip address prefix-list 10.2.2.254-red-pl-ipv4
-route-map 10.2.2.254-red-out permit 5
-  match ipv6 address prefix-list 10.2.2.254-red-pl-ipv4
-
-router bgp 100
-  no bgp ebgp-requires-policy
-  no bgp network import-check
-  no bgp default ipv4-unicast
-
-  bgp router-id 10.1.1.254
-  neighbor 10.2.2.255 remote-as 200
-  neighbor 10.2.2.255 port 179
-  neighbor 10.2.2.255 timers 1 1
-  neighbor 10.2.2.255 password password
-  neighbor 10.2.2.255 update-source 10.1.1.254
-
-  address-family ipv4 unicast
-    neighbor 10.2.2.255 activate
-    neighbor 10.2.2.255 route-map 10.2.2.255-in in
-    neighbor 10.2.2.255 route-map 10.2.2.255-out out
-  exit-address-family
-  address-family ipv6 unicast
-    neighbor 10.2.2.255 activate
-    neighbor 10.2.2.255 route-map 10.2.2.255-in in
-    neighbor 10.2.2.255 route-map 10.2.2.255-out out
-  exit-address-family
-  address-family ipv4 unicast
-    network 172.16.1.11/24
-  exit-address-family
-
-router bgp 100 vrf red
-  no bgp ebgp-requires-policy
-  no bgp network import-check
-  no bgp default ipv4-unicast
-
-  bgp router-id 10.1.1.254
-  neighbor 10.2.2.254 remote-as 200
-  neighbor 10.2.2.254 port 179
-  neighbor 10.2.2.254 timers 1 1
-  neighbor 10.2.2.254 password password
-  neighbor 10.2.2.254 update-source 10.1.1.254
-
-  address-family ipv4 unicast
-    neighbor 10.2.2.254 activate
-    neighbor 10.2.2.254 route-map 10.2.2.254-red-in in
-    neighbor 10.2.2.254 route-map 10.2.2.254-red-out out
-  exit-address-family
-  address-family ipv6 unicast
-    neighbor 10.2.2.254 activate
-    neighbor 10.2.2.254 route-map 10.2.2.254-red-in in
-    neighbor 10.2.2.254 route-map 10.2.2.254-red-out out
-  exit-address-family
-  address-family ipv4 unicast
-    network 172.16.1.10/24
-    network 172.16.1.11/24
-  exit-address-family
-
-
diff --git a/internal/bgp/frr/testdata/TestTwoAdvertisementsTwoSessionsVRFWithPeerSelector.golden b/internal/bgp/frr/testdata/TestTwoAdvertisementsTwoSessionsVRFWithPeerSelector.golden
deleted file mode 100644
index f559e768..00000000
--- a/internal/bgp/frr/testdata/TestTwoAdvertisementsTwoSessionsVRFWithPeerSelector.golden
+++ /dev/null
@@ -1,107 +0,0 @@
-log file /etc/frr/frr.log 
-log timestamp precision 3
-hostname dummyhostname
-ip nht resolve-via-default
-ipv6 nht resolve-via-default
-route-map 10.2.2.255-blue-in deny 20
-
-
-ip prefix-list 10.2.2.255-blue-2-ipv4-localpref-prefixes seq 1 permit 172.16.1.11/24
-route-map 10.2.2.255-blue-out permit 1
-  match ip address prefix-list 10.2.2.255-blue-2-ipv4-localpref-prefixes
-  set local-preference 2
-  on-match next
-
-ip prefix-list 10.2.2.255-blue-1111:2222-ipv4-community-prefixes seq 1 permit 172.16.1.11/24
-route-map 10.2.2.255-blue-out permit 2
-  match ip address prefix-list 10.2.2.255-blue-1111:2222-ipv4-community-prefixes
-  set community 1111:2222 additive
-  on-match next
-
-
- ip prefix-list 10.2.2.255-blue-pl-ipv4 seq 1 permit 172.16.1.11/24
-
-
-
-
-ipv6 prefix-list 10.2.2.255-blue-pl-ipv4 seq 2 deny any
-
-route-map 10.2.2.255-blue-out permit 3
-  match ip address prefix-list 10.2.2.255-blue-pl-ipv4
-route-map 10.2.2.255-blue-out permit 4
-  match ipv6 address prefix-list 10.2.2.255-blue-pl-ipv4
-route-map 10.2.2.254-red-in deny 20
-
-
-ip prefix-list 10.2.2.254-red-1111:2222-ipv4-community-prefixes seq 1 permit 172.16.1.10/24
-route-map 10.2.2.254-red-out permit 1
-  match ip address prefix-list 10.2.2.254-red-1111:2222-ipv4-community-prefixes
-  set community 1111:2222 additive
-  on-match next
-
-
- ip prefix-list 10.2.2.254-red-pl-ipv4 seq 1 permit 172.16.1.10/24
-
-
-
-
-ipv6 prefix-list 10.2.2.254-red-pl-ipv4 seq 2 deny any
-
-route-map 10.2.2.254-red-out permit 2
-  match ip address prefix-list 10.2.2.254-red-pl-ipv4
-route-map 10.2.2.254-red-out permit 3
-  match ipv6 address prefix-list 10.2.2.254-red-pl-ipv4
-
-router bgp 100 vrf blue
-  no bgp ebgp-requires-policy
-  no bgp network import-check
-  no bgp default ipv4-unicast
-
-  bgp router-id 10.1.1.254
-  neighbor 10.2.2.255 remote-as 200
-  neighbor 10.2.2.255 port 179
-  neighbor 10.2.2.255 timers 1 1
-  neighbor 10.2.2.255 password password
-  neighbor 10.2.2.255 update-source 10.1.1.254
-
-  address-family ipv4 unicast
-    neighbor 10.2.2.255 activate
-    neighbor 10.2.2.255 route-map 10.2.2.255-blue-in in
-    neighbor 10.2.2.255 route-map 10.2.2.255-blue-out out
-  exit-address-family
-  address-family ipv6 unicast
-    neighbor 10.2.2.255 activate
-    neighbor 10.2.2.255 route-map 10.2.2.255-blue-in in
-    neighbor 10.2.2.255 route-map 10.2.2.255-blue-out out
-  exit-address-family
-  address-family ipv4 unicast
-    network 172.16.1.11/24
-  exit-address-family
-
-router bgp 100 vrf red
-  no bgp ebgp-requires-policy
-  no bgp network import-check
-  no bgp default ipv4-unicast
-
-  bgp router-id 10.1.1.254
-  neighbor 10.2.2.254 remote-as 200
-  neighbor 10.2.2.254 port 179
-  neighbor 10.2.2.254 timers 1 1
-  neighbor 10.2.2.254 password password
-  neighbor 10.2.2.254 update-source 10.1.1.254
-
-  address-family ipv4 unicast
-    neighbor 10.2.2.254 activate
-    neighbor 10.2.2.254 route-map 10.2.2.254-red-in in
-    neighbor 10.2.2.254 route-map 10.2.2.254-red-out out
-  exit-address-family
-  address-family ipv6 unicast
-    neighbor 10.2.2.254 activate
-    neighbor 10.2.2.254 route-map 10.2.2.254-red-in in
-    neighbor 10.2.2.254 route-map 10.2.2.254-red-out out
-  exit-address-family
-  address-family ipv4 unicast
-    network 172.16.1.10/24
-  exit-address-family
-
-
diff --git a/internal/bgp/frrk8s/frrk8s_test.go b/internal/bgp/frrk8s/frrk8s_test.go
index 3565e916..fd7b0955 100644
--- a/internal/bgp/frrk8s/frrk8s_test.go
+++ b/internal/bgp/frrk8s/frrk8s_test.go
@@ -644,98 +644,6 @@ func TestSingleAdvertisementChange(t *testing.T) {
 	testCheckConfigFile(t)
 }
 
-func TestSingleAdvertisementWithPeerSelector(t *testing.T) {
-	l := log.NewNopLogger()
-	sessionManager := newTestSessionManager(t)
-
-	session, err := sessionManager.NewSession(l,
-		bgp.SessionParameters{
-			PeerAddress:   "10.2.2.254:179",
-			SourceAddress: net.ParseIP("10.1.1.254"),
-			MyASN:         100,
-			RouterID:      net.ParseIP("10.1.1.254"),
-			PeerASN:       200,
-			HoldTime:      time.Second,
-			KeepAliveTime: time.Second,
-			Password:      "password",
-			CurrentNode:   "hostname",
-			EBGPMultiHop:  true,
-			SessionName:   "test-peer"})
-	if err != nil {
-		t.Fatalf("Could not create session: %s", err)
-	}
-	defer session.Close()
-
-	prefix := &net.IPNet{
-		IP:   net.ParseIP("172.16.1.10"),
-		Mask: classCMask,
-	}
-	communities := []community.BGPCommunity{}
-	community1, _ := community.New("1111:2222")
-	communities = append(communities, community1)
-	community2, _ := community.New("3333:4444")
-	communities = append(communities, community2)
-	adv := &bgp.Advertisement{
-		Prefix:      prefix,
-		Communities: communities,
-		LocalPref:   300,
-		Peers:       []string{"test-peer"},
-	}
-
-	err = session.Set(adv)
-	if err != nil {
-		t.Fatalf("Could not advertise prefix: %s", err)
-	}
-
-	testCheckConfigFile(t)
-}
-
-func TestSingleAdvertisementNonExistingPeer(t *testing.T) {
-	l := log.NewNopLogger()
-	sessionManager := newTestSessionManager(t)
-
-	session, err := sessionManager.NewSession(l,
-		bgp.SessionParameters{
-			PeerAddress:   "10.2.2.254:179",
-			SourceAddress: net.ParseIP("10.1.1.254"),
-			MyASN:         100,
-			RouterID:      net.ParseIP("10.1.1.254"),
-			PeerASN:       200,
-			HoldTime:      time.Second,
-			KeepAliveTime: time.Second,
-			Password:      "password",
-			CurrentNode:   "hostname",
-			EBGPMultiHop:  true,
-			SessionName:   "test-peer"})
-	if err != nil {
-		t.Fatalf("Could not create session: %s", err)
-	}
-	defer session.Close()
-
-	prefix := &net.IPNet{
-		IP:   net.ParseIP("172.16.1.10"),
-		Mask: classCMask,
-	}
-	communities := []community.BGPCommunity{}
-	community1, _ := community.New("1111:2222")
-	communities = append(communities, community1)
-	community2, _ := community.New("3333:4444")
-	communities = append(communities, community2)
-	adv := &bgp.Advertisement{
-		Prefix:      prefix,
-		Communities: communities,
-		LocalPref:   300,
-		Peers:       []string{"peer1"},
-	}
-
-	err = session.Set(adv)
-	if err != nil {
-		t.Fatalf("Could not advertise prefix: %s", err)
-	}
-
-	testCheckConfigFile(t)
-}
-
 func TestTwoAdvertisements(t *testing.T) {
 	l := log.NewNopLogger()
 	sessionManager := newTestSessionManager(t)
@@ -882,82 +790,6 @@ func TestTwoAdvertisementsTwoSessions(t *testing.T) {
 	}
 }
 
-func TestTwoAdvertisementsTwoSessionsOneWithPeerSelector(t *testing.T) {
-	l := log.NewNopLogger()
-	sessionManager := newTestSessionManager(t)
-
-	session, err := sessionManager.NewSession(l,
-		bgp.SessionParameters{
-			PeerAddress:   "10.2.2.254:179",
-			SourceAddress: net.ParseIP("10.1.1.254"),
-			MyASN:         100,
-			RouterID:      net.ParseIP("10.1.1.254"),
-			PeerASN:       200,
-			HoldTime:      time.Second,
-			KeepAliveTime: time.Second,
-			Password:      "password",
-			CurrentNode:   "hostname",
-			EBGPMultiHop:  true,
-			SessionName:   "test-peer"})
-	if err != nil {
-		t.Fatalf("Could not create session: %s", err)
-	}
-	defer session.Close()
-
-	session1, err := sessionManager.NewSession(l,
-		bgp.SessionParameters{
-			PeerAddress:   "10.2.2.255:179",
-			SourceAddress: net.ParseIP("10.1.1.254"),
-			MyASN:         100,
-			RouterID:      net.ParseIP("10.1.1.254"),
-			PeerASN:       200,
-			HoldTime:      time.Second,
-			KeepAliveTime: time.Second,
-			Password:      "password",
-			CurrentNode:   "hostname",
-			EBGPMultiHop:  true,
-			SessionName:   "test-peer1"})
-	if err != nil {
-		t.Fatalf("Could not create session: %s", err)
-	}
-	defer session1.Close()
-
-	prefix1 := &net.IPNet{
-		IP:   net.ParseIP("172.16.1.10"),
-		Mask: classCMask,
-	}
-	communities := []community.BGPCommunity{}
-	community, _ := community.New("1111:2222")
-	communities = append(communities, community)
-	adv1 := &bgp.Advertisement{
-		Prefix:      prefix1,
-		Communities: communities,
-		Peers:       []string{"test-peer"},
-	}
-
-	prefix2 := &net.IPNet{
-		IP:   net.ParseIP("172.16.1.11"),
-		Mask: classCMask,
-	}
-
-	adv2 := &bgp.Advertisement{
-		Prefix:      prefix2,
-		Communities: communities,
-		LocalPref:   2,
-	}
-
-	err = session.Set(adv1, adv2)
-	if err != nil {
-		t.Fatalf("Could not advertise prefix: %s", err)
-	}
-	err = session1.Set(adv1, adv2)
-	if err != nil {
-		t.Fatalf("Could not advertise prefix: %s", err)
-	}
-
-	testCheckConfigFile(t)
-}
-
 func TestLargeCommunities(t *testing.T) {
 	l := log.NewNopLogger()
 	sessionManager := newTestSessionManager(t)
diff --git a/internal/bgp/frrk8s/frrk8s_vrf_test.go b/internal/bgp/frrk8s/frrk8s_vrf_test.go
index 2cf67aa2..2ee70264 100644
--- a/internal/bgp/frrk8s/frrk8s_vrf_test.go
+++ b/internal/bgp/frrk8s/frrk8s_vrf_test.go
@@ -296,53 +296,6 @@ func TestSingleAdvertisementChangeVRF(t *testing.T) {
 	testCheckConfigFile(t)
 }
 
-func TestSingleAdvertisementWithPeerSelectorVRF(t *testing.T) {
-	l := log.NewNopLogger()
-	sessionManager := newTestSessionManager(t)
-
-	session, err := sessionManager.NewSession(l,
-		bgp.SessionParameters{
-			PeerAddress:   "10.2.2.254:179",
-			SourceAddress: net.ParseIP("10.1.1.254"),
-			MyASN:         100,
-			RouterID:      net.ParseIP("10.1.1.254"),
-			PeerASN:       200,
-			HoldTime:      time.Second,
-			KeepAliveTime: time.Second,
-			Password:      "password",
-			CurrentNode:   "hostname",
-			EBGPMultiHop:  false,
-			SessionName:   "test-peer",
-			VRFName:       "red"})
-	if err != nil {
-		t.Fatalf("Could not create session: %s", err)
-	}
-	defer session.Close()
-
-	prefix := &net.IPNet{
-		IP:   net.ParseIP("172.16.1.10"),
-		Mask: classCMask,
-	}
-	communities := []community.BGPCommunity{}
-	community1, _ := community.New("1111:2222")
-	communities = append(communities, community1)
-	community2, _ := community.New("3333:4444")
-	communities = append(communities, community2)
-	adv := &bgp.Advertisement{
-		Prefix:      prefix,
-		Communities: communities,
-		LocalPref:   300,
-		Peers:       []string{"test-peer"},
-	}
-
-	err = session.Set(adv)
-	if err != nil {
-		t.Fatalf("Could not advertise prefix: %s", err)
-	}
-
-	testCheckConfigFile(t)
-}
-
 func TestTwoAdvertisementsVRF(t *testing.T) {
 	l := log.NewNopLogger()
 	sessionManager := newTestSessionManager(t)
@@ -470,161 +423,3 @@ func TestTwoAdvertisementsTwoSessionsOneVRF(t *testing.T) {
 
 	testCheckConfigFile(t)
 }
-
-func TestTwoAdvertisementsTwoSessionsOneWithPeerSelectorAndVRF(t *testing.T) {
-	l := log.NewNopLogger()
-	sessionManager := newTestSessionManager(t)
-
-	session, err := sessionManager.NewSession(l,
-		bgp.SessionParameters{
-			PeerAddress:   "10.2.2.254:179",
-			SourceAddress: net.ParseIP("10.1.1.254"),
-			MyASN:         100,
-			RouterID:      net.ParseIP("10.1.1.254"),
-			PeerASN:       200,
-			HoldTime:      time.Second,
-			KeepAliveTime: time.Second,
-			Password:      "password",
-			CurrentNode:   "hostname",
-			EBGPMultiHop:  false,
-			SessionName:   "test-peer",
-			VRFName:       "red"})
-	if err != nil {
-		t.Fatalf("Could not create session: %s", err)
-	}
-	defer session.Close()
-
-	session1, err := sessionManager.NewSession(l,
-		bgp.SessionParameters{
-			PeerAddress:   "10.2.2.255:179",
-			SourceAddress: net.ParseIP("10.1.1.254"),
-			MyASN:         100,
-			RouterID:      net.ParseIP("10.1.1.254"),
-			PeerASN:       200,
-			HoldTime:      time.Second,
-			KeepAliveTime: time.Second,
-			Password:      "password",
-			CurrentNode:   "hostname",
-			EBGPMultiHop:  false,
-			SessionName:   "test-peer1",
-		})
-	if err != nil {
-		t.Fatalf("Could not create session: %s", err)
-	}
-	defer session1.Close()
-
-	prefix1 := &net.IPNet{
-		IP:   net.ParseIP("172.16.1.10"),
-		Mask: classCMask,
-	}
-	communities := []community.BGPCommunity{}
-	community, _ := community.New("1111:2222")
-	communities = append(communities, community)
-	adv1 := &bgp.Advertisement{
-		Prefix:      prefix1,
-		Communities: communities,
-		Peers:       []string{"test-peer"},
-	}
-
-	prefix2 := &net.IPNet{
-		IP:   net.ParseIP("172.16.1.11"),
-		Mask: classCMask,
-	}
-
-	adv2 := &bgp.Advertisement{
-		Prefix:      prefix2,
-		Communities: communities,
-		LocalPref:   2,
-	}
-
-	err = session.Set(adv1, adv2)
-	if err != nil {
-		t.Fatalf("Could not advertise prefix: %s", err)
-	}
-	err = session1.Set(adv1, adv2)
-	if err != nil {
-		t.Fatalf("Could not advertise prefix: %s", err)
-	}
-
-	testCheckConfigFile(t)
-}
-
-func TestTwoAdvertisementsTwoSessionsVRFWithPeerSelector(t *testing.T) {
-	l := log.NewNopLogger()
-	sessionManager := newTestSessionManager(t)
-
-	session, err := sessionManager.NewSession(l,
-		bgp.SessionParameters{
-			PeerAddress:   "10.2.2.254:179",
-			SourceAddress: net.ParseIP("10.1.1.254"),
-			MyASN:         100,
-			RouterID:      net.ParseIP("10.1.1.254"),
-			PeerASN:       200,
-			HoldTime:      time.Second,
-			KeepAliveTime: time.Second,
-			Password:      "password",
-			CurrentNode:   "hostname",
-			EBGPMultiHop:  false,
-			SessionName:   "test-peer",
-			VRFName:       "red"})
-	if err != nil {
-		t.Fatalf("Could not create session: %s", err)
-	}
-	defer session.Close()
-
-	session1, err := sessionManager.NewSession(l,
-		bgp.SessionParameters{
-			PeerAddress:   "10.2.2.255:179",
-			SourceAddress: net.ParseIP("10.1.1.254"),
-			MyASN:         100,
-			RouterID:      net.ParseIP("10.1.1.254"),
-			PeerASN:       200,
-			HoldTime:      time.Second,
-			KeepAliveTime: time.Second,
-			Password:      "password",
-			CurrentNode:   "hostname",
-			EBGPMultiHop:  false,
-			SessionName:   "test-peer1",
-			VRFName:       "blue",
-		})
-	if err != nil {
-		t.Fatalf("Could not create session: %s", err)
-	}
-	defer session1.Close()
-
-	prefix1 := &net.IPNet{
-		IP:   net.ParseIP("172.16.1.10"),
-		Mask: classCMask,
-	}
-	communities := []community.BGPCommunity{}
-	community, _ := community.New("1111:2222")
-	communities = append(communities, community)
-	adv1 := &bgp.Advertisement{
-		Prefix:      prefix1,
-		Communities: communities,
-		Peers:       []string{"test-peer"},
-	}
-
-	prefix2 := &net.IPNet{
-		IP:   net.ParseIP("172.16.1.11"),
-		Mask: classCMask,
-	}
-
-	adv2 := &bgp.Advertisement{
-		Prefix:      prefix2,
-		Communities: communities,
-		LocalPref:   2,
-		Peers:       []string{"test-peer1"},
-	}
-
-	err = session.Set(adv1, adv2)
-	if err != nil {
-		t.Fatalf("Could not advertise prefix: %s", err)
-	}
-	err = session1.Set(adv1, adv2)
-	if err != nil {
-		t.Fatalf("Could not advertise prefix: %s", err)
-	}
-
-	testCheckConfigFile(t)
-}
diff --git a/internal/bgp/frrk8s/testdata/TestSingleAdvertisementNonExistingPeer.golden b/internal/bgp/frrk8s/testdata/TestSingleAdvertisementNonExistingPeer.golden
deleted file mode 100644
index 055b3bc2..00000000
--- a/internal/bgp/frrk8s/testdata/TestSingleAdvertisementNonExistingPeer.golden
+++ /dev/null
@@ -1,42 +0,0 @@
-{
-    "metadata": {
-        "name": "metallb-testnodename",
-        "namespace": "testnamespace",
-        "creationTimestamp": null
-    },
-    "spec": {
-        "bgp": {
-            "routers": [
-                {
-                    "asn": 100,
-                    "id": "10.1.1.254",
-                    "neighbors": [
-                        {
-                            "asn": 200,
-                            "address": "10.2.2.254",
-                            "port": 179,
-                            "password": "password",
-                            "passwordSecret": {},
-                            "holdTime": "1s",
-                            "keepaliveTime": "1s",
-                            "ebgpMultiHop": true,
-                            "toAdvertise": {
-                                "allowed": {}
-                            },
-                            "toReceive": {
-                                "allowed": {}
-                            }
-                        }
-                    ]
-                }
-            ]
-        },
-        "raw": {},
-        "nodeSelector": {
-            "matchLabels": {
-                "kubernetes.io/hostname": "testnodename"
-            }
-        }
-    },
-    "status": {}
-}
\ No newline at end of file
diff --git a/internal/bgp/frrk8s/testdata/TestSingleAdvertisementWithPeerSelector.golden b/internal/bgp/frrk8s/testdata/TestSingleAdvertisementWithPeerSelector.golden
deleted file mode 100644
index 33da5863..00000000
--- a/internal/bgp/frrk8s/testdata/TestSingleAdvertisementWithPeerSelector.golden
+++ /dev/null
@@ -1,71 +0,0 @@
-{
-    "metadata": {
-        "name": "metallb-testnodename",
-        "namespace": "testnamespace",
-        "creationTimestamp": null
-    },
-    "spec": {
-        "bgp": {
-            "routers": [
-                {
-                    "asn": 100,
-                    "id": "10.1.1.254",
-                    "neighbors": [
-                        {
-                            "asn": 200,
-                            "address": "10.2.2.254",
-                            "port": 179,
-                            "password": "password",
-                            "passwordSecret": {},
-                            "holdTime": "1s",
-                            "keepaliveTime": "1s",
-                            "ebgpMultiHop": true,
-                            "toAdvertise": {
-                                "allowed": {
-                                    "prefixes": [
-                                        "172.16.1.10/24"
-                                    ]
-                                },
-                                "withLocalPref": [
-                                    {
-                                        "prefixes": [
-                                            "172.16.1.10/24"
-                                        ],
-                                        "localPref": 300
-                                    }
-                                ],
-                                "withCommunity": [
-                                    {
-                                        "prefixes": [
-                                            "172.16.1.10/24"
-                                        ],
-                                        "community": "1111:2222"
-                                    },
-                                    {
-                                        "prefixes": [
-                                            "172.16.1.10/24"
-                                        ],
-                                        "community": "3333:4444"
-                                    }
-                                ]
-                            },
-                            "toReceive": {
-                                "allowed": {}
-                            }
-                        }
-                    ],
-                    "prefixes": [
-                        "172.16.1.10/24"
-                    ]
-                }
-            ]
-        },
-        "raw": {},
-        "nodeSelector": {
-            "matchLabels": {
-                "kubernetes.io/hostname": "testnodename"
-            }
-        }
-    },
-    "status": {}
-}
\ No newline at end of file
diff --git a/internal/bgp/frrk8s/testdata/TestSingleAdvertisementWithPeerSelectorVRF.golden b/internal/bgp/frrk8s/testdata/TestSingleAdvertisementWithPeerSelectorVRF.golden
deleted file mode 100644
index 3f92b091..00000000
--- a/internal/bgp/frrk8s/testdata/TestSingleAdvertisementWithPeerSelectorVRF.golden
+++ /dev/null
@@ -1,71 +0,0 @@
-{
-    "metadata": {
-        "name": "metallb-testnodename",
-        "namespace": "testnamespace",
-        "creationTimestamp": null
-    },
-    "spec": {
-        "bgp": {
-            "routers": [
-                {
-                    "asn": 100,
-                    "id": "10.1.1.254",
-                    "vrf": "red",
-                    "neighbors": [
-                        {
-                            "asn": 200,
-                            "address": "10.2.2.254",
-                            "port": 179,
-                            "password": "password",
-                            "passwordSecret": {},
-                            "holdTime": "1s",
-                            "keepaliveTime": "1s",
-                            "toAdvertise": {
-                                "allowed": {
-                                    "prefixes": [
-                                        "172.16.1.10/24"
-                                    ]
-                                },
-                                "withLocalPref": [
-                                    {
-                                        "prefixes": [
-                                            "172.16.1.10/24"
-                                        ],
-                                        "localPref": 300
-                                    }
-                                ],
-                                "withCommunity": [
-                                    {
-                                        "prefixes": [
-                                            "172.16.1.10/24"
-                                        ],
-                                        "community": "1111:2222"
-                                    },
-                                    {
-                                        "prefixes": [
-                                            "172.16.1.10/24"
-                                        ],
-                                        "community": "3333:4444"
-                                    }
-                                ]
-                            },
-                            "toReceive": {
-                                "allowed": {}
-                            }
-                        }
-                    ],
-                    "prefixes": [
-                        "172.16.1.10/24"
-                    ]
-                }
-            ]
-        },
-        "raw": {},
-        "nodeSelector": {
-            "matchLabels": {
-                "kubernetes.io/hostname": "testnodename"
-            }
-        }
-    },
-    "status": {}
-}
\ No newline at end of file
diff --git a/internal/bgp/frrk8s/testdata/TestTwoAdvertisementsTwoSessionsOneWithPeerSelector.golden b/internal/bgp/frrk8s/testdata/TestTwoAdvertisementsTwoSessionsOneWithPeerSelector.golden
deleted file mode 100644
index 011129d9..00000000
--- a/internal/bgp/frrk8s/testdata/TestTwoAdvertisementsTwoSessionsOneWithPeerSelector.golden
+++ /dev/null
@@ -1,104 +0,0 @@
-{
-    "metadata": {
-        "name": "metallb-testnodename",
-        "namespace": "testnamespace",
-        "creationTimestamp": null
-    },
-    "spec": {
-        "bgp": {
-            "routers": [
-                {
-                    "asn": 100,
-                    "id": "10.1.1.254",
-                    "neighbors": [
-                        {
-                            "asn": 200,
-                            "address": "10.2.2.254",
-                            "port": 179,
-                            "password": "password",
-                            "passwordSecret": {},
-                            "holdTime": "1s",
-                            "keepaliveTime": "1s",
-                            "ebgpMultiHop": true,
-                            "toAdvertise": {
-                                "allowed": {
-                                    "prefixes": [
-                                        "172.16.1.10/24",
-                                        "172.16.1.11/24"
-                                    ]
-                                },
-                                "withLocalPref": [
-                                    {
-                                        "prefixes": [
-                                            "172.16.1.11/24"
-                                        ],
-                                        "localPref": 2
-                                    }
-                                ],
-                                "withCommunity": [
-                                    {
-                                        "prefixes": [
-                                            "172.16.1.10/24",
-                                            "172.16.1.11/24"
-                                        ],
-                                        "community": "1111:2222"
-                                    }
-                                ]
-                            },
-                            "toReceive": {
-                                "allowed": {}
-                            }
-                        },
-                        {
-                            "asn": 200,
-                            "address": "10.2.2.255",
-                            "port": 179,
-                            "password": "password",
-                            "passwordSecret": {},
-                            "holdTime": "1s",
-                            "keepaliveTime": "1s",
-                            "ebgpMultiHop": true,
-                            "toAdvertise": {
-                                "allowed": {
-                                    "prefixes": [
-                                        "172.16.1.11/24"
-                                    ]
-                                },
-                                "withLocalPref": [
-                                    {
-                                        "prefixes": [
-                                            "172.16.1.11/24"
-                                        ],
-                                        "localPref": 2
-                                    }
-                                ],
-                                "withCommunity": [
-                                    {
-                                        "prefixes": [
-                                            "172.16.1.11/24"
-                                        ],
-                                        "community": "1111:2222"
-                                    }
-                                ]
-                            },
-                            "toReceive": {
-                                "allowed": {}
-                            }
-                        }
-                    ],
-                    "prefixes": [
-                        "172.16.1.10/24",
-                        "172.16.1.11/24"
-                    ]
-                }
-            ]
-        },
-        "raw": {},
-        "nodeSelector": {
-            "matchLabels": {
-                "kubernetes.io/hostname": "testnodename"
-            }
-        }
-    },
-    "status": {}
-}
\ No newline at end of file
diff --git a/internal/bgp/frrk8s/testdata/TestTwoAdvertisementsTwoSessionsOneWithPeerSelectorAndVRF.golden b/internal/bgp/frrk8s/testdata/TestTwoAdvertisementsTwoSessionsOneWithPeerSelectorAndVRF.golden
deleted file mode 100644
index b06387b4..00000000
--- a/internal/bgp/frrk8s/testdata/TestTwoAdvertisementsTwoSessionsOneWithPeerSelectorAndVRF.golden
+++ /dev/null
@@ -1,112 +0,0 @@
-{
-    "metadata": {
-        "name": "metallb-testnodename",
-        "namespace": "testnamespace",
-        "creationTimestamp": null
-    },
-    "spec": {
-        "bgp": {
-            "routers": [
-                {
-                    "asn": 100,
-                    "id": "10.1.1.254",
-                    "neighbors": [
-                        {
-                            "asn": 200,
-                            "address": "10.2.2.255",
-                            "port": 179,
-                            "password": "password",
-                            "passwordSecret": {},
-                            "holdTime": "1s",
-                            "keepaliveTime": "1s",
-                            "toAdvertise": {
-                                "allowed": {
-                                    "prefixes": [
-                                        "172.16.1.11/24"
-                                    ]
-                                },
-                                "withLocalPref": [
-                                    {
-                                        "prefixes": [
-                                            "172.16.1.11/24"
-                                        ],
-                                        "localPref": 2
-                                    }
-                                ],
-                                "withCommunity": [
-                                    {
-                                        "prefixes": [
-                                            "172.16.1.11/24"
-                                        ],
-                                        "community": "1111:2222"
-                                    }
-                                ]
-                            },
-                            "toReceive": {
-                                "allowed": {}
-                            }
-                        }
-                    ],
-                    "prefixes": [
-                        "172.16.1.11/24"
-                    ]
-                },
-                {
-                    "asn": 100,
-                    "id": "10.1.1.254",
-                    "vrf": "red",
-                    "neighbors": [
-                        {
-                            "asn": 200,
-                            "address": "10.2.2.254",
-                            "port": 179,
-                            "password": "password",
-                            "passwordSecret": {},
-                            "holdTime": "1s",
-                            "keepaliveTime": "1s",
-                            "toAdvertise": {
-                                "allowed": {
-                                    "prefixes": [
-                                        "172.16.1.10/24",
-                                        "172.16.1.11/24"
-                                    ]
-                                },
-                                "withLocalPref": [
-                                    {
-                                        "prefixes": [
-                                            "172.16.1.11/24"
-                                        ],
-                                        "localPref": 2
-                                    }
-                                ],
-                                "withCommunity": [
-                                    {
-                                        "prefixes": [
-                                            "172.16.1.10/24",
-                                            "172.16.1.11/24"
-                                        ],
-                                        "community": "1111:2222"
-                                    }
-                                ]
-                            },
-                            "toReceive": {
-                                "allowed": {}
-                            }
-                        }
-                    ],
-                    "prefixes": [
-                        "172.16.1.10/24",
-                        "172.16.1.11/24"
-                    ]
-                }
-            ]
-        },
-        "raw": {},
-        "nodeSelector": {
-            "matchLabels": {
-                "kubernetes.io/hostname": "testnodename"
-            }
-        }
-    },
-    "status": {}
-}
\ No newline at end of file
diff --git a/internal/bgp/frrk8s/testdata/TestTwoAdvertisementsTwoSessionsVRFWithPeerSelector.golden b/internal/bgp/frrk8s/testdata/TestTwoAdvertisementsTwoSessionsVRFWithPeerSelector.golden
deleted file mode 100644
index 8edddca3..00000000
--- a/internal/bgp/frrk8s/testdata/TestTwoAdvertisementsTwoSessionsVRFWithPeerSelector.golden
+++ /dev/null
@@ -1,102 +0,0 @@
-{
-    "metadata": {
-        "name": "metallb-testnodename",
-        "namespace": "testnamespace",
-        "creationTimestamp": null
-    },
-    "spec": {
-        "bgp": {
-            "routers": [
-                {
-                    "asn": 100,
-                    "id": "10.1.1.254",
-                    "vrf": "blue",
-                    "neighbors": [
-                        {
-                            "asn": 200,
-                            "address": "10.2.2.255",
-                            "port": 179,
-                            "password": "password",
-                            "passwordSecret": {},
-                            "holdTime": "1s",
-                            "keepaliveTime": "1s",
-                            "toAdvertise": {
-                                "allowed": {
-                                    "prefixes": [
-                                        "172.16.1.11/24"
-                                    ]
-                                },
-                                "withLocalPref": [
-                                    {
-                                        "prefixes": [
-                                            "172.16.1.11/24"
-                                        ],
-                                        "localPref": 2
-                                    }
-                                ],
-                                "withCommunity": [
-                                    {
-                                        "prefixes": [
-                                            "172.16.1.11/24"
-                                        ],
-                                        "community": "1111:2222"
-                                    }
-                                ]
-                            },
-                            "toReceive": {
-                                "allowed": {}
-                            }
-                        }
-                    ],
-                    "prefixes": [
-                        "172.16.1.11/24"
-                    ]
-                },
-                {
-                    "asn": 100,
-                    "id": "10.1.1.254",
-                    "vrf": "red",
-                    "neighbors": [
-                        {
-                            "asn": 200,
-                            "address": "10.2.2.254",
-                            "port": 179,
-                            "password": "password",
-                            "passwordSecret": {},
-                            "holdTime": "1s",
-                            "keepaliveTime": "1s",
-                            "toAdvertise": {
-                                "allowed": {
-                                    "prefixes": [
-                                        "172.16.1.10/24"
-                                    ]
-                                },
-                                "withCommunity": [
-                                    {
-                                        "prefixes": [
-                                            "172.16.1.10/24"
-                                        ],
-                                        "community": "1111:2222"
-                                    }
-                                ]
-                            },
-                            "toReceive": {
-                                "allowed": {}
-                            }
-                        }
-                    ],
-                    "prefixes": [
-                        "172.16.1.10/24"
-                    ]
-                }
-            ]
-        },
-        "raw": {},
-        "nodeSelector": {
-            "matchLabels": {
-                "kubernetes.io/hostname": "testnodename"
-            }
-        }
-    },
-    "status": {}
-}
\ No newline at end of file
diff --git a/speaker/bgp_controller_test.go b/speaker/bgp_controller_test.go
index 9cc1f1d4..8ef2410e 100644
--- a/speaker/bgp_controller_test.go
+++ b/speaker/bgp_controller_test.go
@@ -865,6 +865,134 @@ func TestBGPSpeaker(t *testing.T) {
 			expectedLBRet:  controllers.SyncStateSuccess,
 		},
 
+		{
+			desc: "Multiple peers, selector",
+			config: &config.Config{
+				Peers: map[string]*config.Peer{
+					"peer1": {
+						Addr:          net.ParseIP("1.2.3.4"),
+						Name:          "peer1",
+						NodeSelectors: []labels.Selector{labels.Everything()},
+					},
+					"peer2": {
+						Addr:          net.ParseIP("1.2.3.5"),
+						Name:          "peer2",
+						NodeSelectors: []labels.Selector{labels.Everything()},
+					},
+				},
+				Pools: &config.Pools{ByName: map[string]*config.Pool{
+					"default": {
+						CIDR: []*net.IPNet{ipnet("10.20.30.0/24")},
+						BGPAdvertisements: []*config.BGPAdvertisement{
+							{
+								AggregationLength: 32,
+								Nodes:             map[string]bool{"pandora": true},
+								Peers:             []string{"peer1"},
+							},
+						},
+					},
+				}},
+			},
+			balancer: "test1",
+			svc: &v1.Service{
+				Spec: v1.ServiceSpec{
+					Type:                  "LoadBalancer",
+					ExternalTrafficPolicy: "Cluster",
+				},
+				Status: statusAssigned("10.20.30.1"),
+			},
+			eps: epslices.EpsOrSlices{
+				EpVal: &v1.Endpoints{
+					Subsets: []v1.EndpointSubset{
+						{
+							Addresses: []v1.EndpointAddress{
+								{
+									IP:       "2.3.4.5",
+									NodeName: pointer.StrPtr("iris"),
+								},
+							},
+						},
+					},
+				},
+				Type: epslices.Eps,
+			},
+			wantAds: map[string][]*bgp.Advertisement{
+				"1.2.3.4:0": {
+					{
+						Prefix: ipnet("10.20.30.1/32"),
+						Peers:  []string{"peer1"},
+					},
+				},
+				"1.2.3.5:0": nil,
+			},
+			expectedCfgRet: controllers.SyncStateReprocessAll,
+			expectedLBRet:  controllers.SyncStateSuccess,
+		},
+
+		{
+			desc: "Multiple peers",
+			config: &config.Config{
+				Peers: map[string]*config.Peer{
+					"peer1": {
+						Addr:          net.ParseIP("1.2.3.4"),
+						NodeSelectors: []labels.Selector{labels.Everything()},
+					},
+					"peer2": {
+						Addr:          net.ParseIP("1.2.3.5"),
+						NodeSelectors: []labels.Selector{labels.Everything()},
+					},
+				},
+				Pools: &config.Pools{ByName: map[string]*config.Pool{
+					"default": {
+						CIDR: []*net.IPNet{ipnet("10.20.30.0/24")},
+						BGPAdvertisements: []*config.BGPAdvertisement{
+							{
+								AggregationLength: 32,
+								Nodes:             map[string]bool{"pandora": true},
+							},
+						},
+					},
+				}},
+			},
+			balancer: "test1",
+			svc: &v1.Service{
+				Spec: v1.ServiceSpec{
+					Type:                  "LoadBalancer",
+					ExternalTrafficPolicy: "Cluster",
+				},
+				Status: statusAssigned("10.20.30.1"),
+			},
+			eps: epslices.EpsOrSlices{
+				EpVal: &v1.Endpoints{
+					Subsets: []v1.EndpointSubset{
+						{
+							Addresses: []v1.EndpointAddress{
+								{
+									IP:       "2.3.4.5",
+									NodeName: pointer.StrPtr("iris"),
+								},
+							},
+						},
+					},
+				},
+				Type: epslices.Eps,
+			},
+			wantAds: map[string][]*bgp.Advertisement{
+				"1.2.3.4:0": {
+					{
+						Prefix: ipnet("10.20.30.1/32"),
+					},
+				},
+				"1.2.3.5:0": {
+					{
+						Prefix: ipnet("10.20.30.1/32"),
+					},
+				},
+			},
+			expectedCfgRet: controllers.SyncStateReprocessAll,
+			expectedLBRet:  controllers.SyncStateSuccess,
+		},
+
 		{
 			desc:     "Second balancer, no ingress assigned",
 			balancer: "test2",