aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeale Ranns <neale@graphiant.com>2021-07-21 13:29:58 +0000
committerBeno�t Ganne <bganne@cisco.com>2021-07-22 07:50:03 +0000
commit8561e73e55879cf76bfe4f57f4234974d0c1512b (patch)
tree40f61cbf2d921b3c03308c8c838ee0a0fd0ee3fd
parentc941fcbc783bc83461422a3f975d24a5c0ef6a77 (diff)
interface: Byte swap the duplex value in interface details
Type: fix Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I6d9473a7b5ab0fbd460e80df36368dd43c5e4fee
-rw-r--r--src/vnet/interface_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vnet/interface_api.c b/src/vnet/interface_api.c
index 5595758c83e..a1450bd1906 100644
--- a/src/vnet/interface_api.c
+++ b/src/vnet/interface_api.c
@@ -259,8 +259,8 @@ send_sw_interface_details (vpe_api_main_t * am,
}
mp->type = ntohl (mp->type);
- mp->link_duplex = ((hi->flags & VNET_HW_INTERFACE_FLAG_DUPLEX_MASK) >>
- VNET_HW_INTERFACE_FLAG_DUPLEX_SHIFT);
+ mp->link_duplex = ntohl (((hi->flags & VNET_HW_INTERFACE_FLAG_DUPLEX_MASK) >>
+ VNET_HW_INTERFACE_FLAG_DUPLEX_SHIFT));
mp->link_speed = ntohl (hi->link_speed);
mp->link_mtu = ntohs (hi->max_packet_bytes);
mp->mtu[VNET_MTU_L3] = ntohl (swif->mtu[VNET_MTU_L3]);