aboutsummaryrefslogtreecommitdiff
path: root/slirp
diff options
context:
space:
mode:
Diffstat (limited to 'slirp')
-rw-r--r--slirp/slirp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/slirp/slirp.c b/slirp/slirp.c
index a9674ab..739f364 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -829,7 +829,7 @@ void slirp_input(Slirp *slirp, const uint8_t *pkt, int pkt_len)
if (pkt_len < ETH_HLEN)
return;
- proto = ntohs(*(uint16_t *)(pkt + 12));
+ proto = (((uint16_t) pkt[12]) << 8) + pkt[13];
switch(proto) {
case ETH_P_ARP:
arp_input(slirp, pkt, pkt_len);