diff --git a/headers/private/net/net_stack.h b/headers/private/net/net_stack.h index 6c66e5f563..1ec5e87f01 100644 --- a/headers/private/net/net_stack.h +++ b/headers/private/net/net_stack.h @@ -77,7 +77,7 @@ typedef struct ancillary_data_container ancillary_data_container; #define B_NET_FRAME_TYPE(super, sub) (((int32)(super) << 16) | (sub)) // Use this when registering a device handler, see net/if_types.h for - // the possible "super" values. + // the possible "super" values. Input values are in host byte order. // sub types diff --git a/src/add-ons/kernel/network/stack/link.cpp b/src/add-ons/kernel/network/stack/link.cpp index 5351970633..a1341aafc7 100644 --- a/src/add-ons/kernel/network/stack/link.cpp +++ b/src/add-ons/kernel/network/stack/link.cpp @@ -167,7 +167,7 @@ LinkProtocol::Bind(const sockaddr* address) if (linkAddress.sdl_type != 0) { fBoundType = B_NET_FRAME_TYPE(linkAddress.sdl_type, - linkAddress.sdl_e_type); + ntohs(linkAddress.sdl_e_type)); // Bind to the type requested - this is needed in order to // receive any buffers // TODO: this could be easily changed by introducing catch all or rule