mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-26 13:04:13 +00:00
TRA-4065 support inflight tap target update (#556)
* WIP * WIP * Update main.go * Update main.go and passive_tapper.go * Update passive_tapper.go * Update passive_tapper.go * Update passive_tapper.go * Update passive_tapper.go
This commit is contained in:
@@ -151,13 +151,13 @@ func inArrayPod(pods []v1.Pod, address string) bool {
|
||||
|
||||
func (factory *tcpStreamFactory) getStreamProps(srcIP string, srcPort string, dstIP string, dstPort string) *streamProps {
|
||||
if factory.opts.HostMode {
|
||||
if inArrayPod(factory.opts.FilterAuthorities, fmt.Sprintf("%s:%s", dstIP, dstPort)) {
|
||||
if inArrayPod(tapTargets, fmt.Sprintf("%s:%s", dstIP, dstPort)) {
|
||||
return &streamProps{isTapTarget: true, isOutgoing: false}
|
||||
} else if inArrayPod(factory.opts.FilterAuthorities, dstIP) {
|
||||
} else if inArrayPod(tapTargets, dstIP) {
|
||||
return &streamProps{isTapTarget: true, isOutgoing: false}
|
||||
} else if inArrayPod(factory.opts.FilterAuthorities, fmt.Sprintf("%s:%s", srcIP, srcPort)) {
|
||||
} else if inArrayPod(tapTargets, fmt.Sprintf("%s:%s", srcIP, srcPort)) {
|
||||
return &streamProps{isTapTarget: true, isOutgoing: true}
|
||||
} else if inArrayPod(factory.opts.FilterAuthorities, srcIP) {
|
||||
} else if inArrayPod(tapTargets, srcIP) {
|
||||
return &streamProps{isTapTarget: true, isOutgoing: true}
|
||||
}
|
||||
return &streamProps{isTapTarget: false, isOutgoing: false}
|
||||
|
Reference in New Issue
Block a user