diff options
Diffstat (limited to 'hw/net/net_tx_pkt.c')
-rw-r--r-- | hw/net/net_tx_pkt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/net/net_tx_pkt.c b/hw/net/net_tx_pkt.c index e29c881bc2..162f802dd7 100644 --- a/hw/net/net_tx_pkt.c +++ b/hw/net/net_tx_pkt.c @@ -205,7 +205,7 @@ static bool net_tx_pkt_parse_headers(struct NetTxPkt *pkt) return false; } - pkt->l4proto = ((struct ip_header *) l3_hdr->iov_base)->ip_p; + pkt->l4proto = IP_HDR_GET_P(l3_hdr->iov_base); if (IP_HDR_GET_LEN(l3_hdr->iov_base) != sizeof(struct ip_header)) { /* copy optional IPv4 header data if any*/ |