Skip to content

Native Endian rather than BigEndian #9

Description

@leocrawford

In tproxy_udp.go we have:

if err = binary.Read(bytes.NewReader(msg.Data), binary.BigEndian, originalDstRaw); err != nil {

This failed on a big endian box, but adjusting it to

if err = binary.Read(bytes.NewReader(msg.Data), nativeEndian, originalDstRaw); err != nil {

where nativeEndian was defined here: https://stackoverflow.com/questions/51332658/any-better-way-to-check-endianness-in-go worked fine.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions