Skip to content

Commit

Permalink
nfs: enforce unique ILLEGAL opname when failed to match operation (el…
Browse files Browse the repository at this point in the history
…astic#11503)

When we fail to map packet to a valid NFS4 operation, then opname
ILLEGAL with opcode it used, like `ILLEGAL (4294967295)`. While
this points to a bug in packet detection, such 'random' illegal
opnames create multiple new operations that confuse kibana.

Do not include opcode into opname ILLEGAL.

Signed-off-by: Tigran Mkrtchyan <[email protected]>
  • Loading branch information
kofemann authored and adriansr committed Apr 30, 2019
1 parent a5bdf52 commit f457715
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
*Packetbeat*

- Add support for mongodb opcode 2013 (OP_MSG). {issue}6191[6191] {pull}8594[8594]
- NFSv4: Always use opname `ILLEGAL` when failed to match request to a valid nfs operation. {pull}11503[11503]

*Winlogbeat*

Expand Down
4 changes: 1 addition & 3 deletions packetbeat/protos/nfs/nfs4.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

package nfs

import "fmt"

const (
opAccess = 3
opClose = 4
Expand Down Expand Up @@ -234,7 +232,7 @@ func (nfs *nfs) findV4MainOpcode(xdr *xdr) string {
opname, ok := nfsOpnum4[op]

if !ok {
return fmt.Sprintf("ILLEGAL (%d)", op)
return "ILLEGAL"
}
currentOpname = opname

Expand Down

0 comments on commit f457715

Please sign in to comment.