Skip to content

Commit

Permalink
user : fix incorrect TimeStamp
Browse files Browse the repository at this point in the history
Signed-off-by: CFC4N <[email protected]>
  • Loading branch information
cfc4n committed Aug 20, 2022
1 parent cb58269 commit ad3e435
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions user/probe_openssl_tc.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,8 @@ func (this *MOpenSSLProbe) initDecodeFunTC() error {
}

func (this *MOpenSSLProbe) dumpTcSkb(event *TcSkbEvent) {

//this.logger.Printf("%s\t%s\n", this.Name(), event.String())
var netEventMetadata *NetEventMetadata = &NetEventMetadata{}
// timeStamp is nanoseconds since system boot time
// To get the monotonic time since tracee was started, we have to subtract the start time from the timestamp.
netEventMetadata.TimeStamp += this.bootTime

if err := this.writePacket(event.Len, this.ifIdex, time.Unix(0, int64(netEventMetadata.TimeStamp)), event.Payload()); err != nil {
var timeStamp = this.bootTime + event.Ts
if err := this.writePacket(event.Len, this.ifIdex, time.Unix(0, int64(timeStamp)), event.Payload()); err != nil {
this.logger.Printf("%s\t save packet error %s .\n", this.Name(), err.Error())
}
return
Expand Down

0 comments on commit ad3e435

Please sign in to comment.