fix: Correct IP latching order to prevent metadata overwrite
This commit is contained in:
@@ -125,11 +125,6 @@ func (c *Capturer) processStream(r io.Reader) {
|
|||||||
|
|
||||||
// Detect start of SIP message
|
// Detect start of SIP message
|
||||||
if idx := findSIPStart(line); idx != -1 {
|
if idx := findSIPStart(line); idx != -1 {
|
||||||
// Latch the current network info for this message
|
|
||||||
if c.currentNetInfo != nil {
|
|
||||||
info := *c.currentNetInfo
|
|
||||||
msgNetInfo = &info
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clean the line (remove prefix garbage)
|
// Clean the line (remove prefix garbage)
|
||||||
line = line[idx:]
|
line = line[idx:]
|
||||||
|
|||||||
@@ -148,12 +148,6 @@ func (c *LocalCapturer) processStream(r io.Reader) {
|
|||||||
// Detect start of SIP message
|
// Detect start of SIP message
|
||||||
if idx := findSIPStart(line); idx != -1 {
|
if idx := findSIPStart(line); idx != -1 {
|
||||||
logger.Debug("SIP Start detected: %s", line)
|
logger.Debug("SIP Start detected: %s", line)
|
||||||
// Latch the current network info for this message
|
|
||||||
if c.currentNetInfo != nil {
|
|
||||||
// Make a copy
|
|
||||||
info := *c.currentNetInfo
|
|
||||||
msgNetInfo = &info
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clean the line (remove prefix garbage)
|
// Clean the line (remove prefix garbage)
|
||||||
line = line[idx:]
|
line = line[idx:]
|
||||||
|
|||||||
Reference in New Issue
Block a user