Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
firefart committed Jul 11, 2022
1 parent 6c9b601 commit 4f5e170
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/requests_turn.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func AllocateRequest(targetProtocol RequestedTransport, allocateProtcol Allocate
if allocateProtcol != AllocateProtocolIgnore {
s.Attributes = append(s.Attributes, Attribute{
Type: AttrRequestedAddressFamily,
Value: []byte{byte(allocateProtcol), 0x00, 0x00, 0x00, 0x00},
Value: []byte{byte(allocateProtcol), 0x00, 0x00, 0x00, 0x00}, // 1 byte to pad the single byte allocateProtocol to the needed 2 bytes and 3 reserved
})
}

Expand Down Expand Up @@ -64,7 +64,7 @@ func AllocateRequestAuth(username, password, nonce, realm string, targetProtocol
if allocateProtcol != AllocateProtocolIgnore {
s.Attributes = append(s.Attributes, Attribute{
Type: AttrRequestedAddressFamily,
Value: []byte{byte(allocateProtcol), 0x00, 0x00, 0x00, 0x00},
Value: []byte{byte(allocateProtcol), 0x00, 0x00, 0x00, 0x00}, // 1 byte to pad the single byte allocateProtocol to the needed 2 bytes and 3 reserved bytes
})
}

Expand Down

0 comments on commit 4f5e170

Please sign in to comment.