Skip to content

Commit

Permalink
wondering why traffic is not encrypted?
Browse files Browse the repository at this point in the history
  • Loading branch information
5amu committed Mar 16, 2024
1 parent e25ff6d commit 93c4057
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/smb/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ func (conn *conn) makeRequestResponse(req smb2.Packet, tc *treeConn, ctx context

if s != nil {
if _, ok := req.(*smb2.SessionSetupRequest); !ok {
if s.sessionFlags&smb2.SMB2_SESSION_FLAG_ENCRYPT_DATA != 0 || (tc != nil && tc.shareFlags&smb2.SMB2_SHAREFLAG_ENCRYPT_DATA != 0) {
if s.sessionFlags&smb2.SMB2_SESSION_FLAG_ENCRYPT_DATA == 0 || (tc != nil && tc.shareFlags&smb2.SMB2_SHAREFLAG_ENCRYPT_DATA != 0) {
pkt, err = s.encrypt(pkt)
if err != nil {
return nil, &InternalError{err.Error()}
Expand Down

0 comments on commit 93c4057

Please sign in to comment.