@@ -8,8 +8,6 @@ Subject: [PATCH 4/5] black_hole: apply Fisher-Yates shuffle algorithm to
88 plugin/executable/black_hole/black_hole.go | 15 +++++++++++++++
99 1 file changed, 15 insertions(+)
1010
11- diff --git a/plugin/executable/black_hole/black_hole.go b/plugin/executable/black_hole/black_hole.go
12- index 775253d..f955019 100644
1311--- a/plugin/executable/black_hole/black_hole.go
1412+++ b/plugin/executable/black_hole/black_hole.go
1513@@ -27,6 +27,8 @@ import (
@@ -21,15 +19,15 @@ index 775253d..f955019 100644
2119 )
2220
2321 const PluginType = "black_hole"
24- @@ -40,6 +42,7 @@ var _ sequence.Executable = (*BlackHole)(nil)
22+ @@ -40,6 +42,7 @@ var _ sequence.Executable = (*BlackHole)
2523 type BlackHole struct {
2624 ipv4 []netip.Addr
2725 ipv6 []netip.Addr
2826+ shuffleMutex sync.Mutex
2927 }
3028
3129 // QuickSetup format: [ipv4|ipv6] ...
32- @@ -65,9 +68,21 @@ func NewBlackHole(ips []string) (*BlackHole, error) {
30+ @@ -65,9 +68,21 @@ func NewBlackHole(ips []string) (*BlackH
3331 return b, nil
3432 }
3533
@@ -51,6 +49,3 @@ index 775253d..f955019 100644
5149 if r := b.Response(qCtx.Q()); r != nil {
5250 qCtx.SetResponse(r)
5351 }
54- - -
55- 2.42.0
56-
0 commit comments