Skip to content

Commit 75bd512

Browse files
NoahChinitzdennisafa
authored andcommitted
[Bug Fix] ARP endianess fixed (#317)
Changes the source IP address in ARP reply from CPU byte ordering to BE. Commit log: * ARP endianess fixed
1 parent 61ce33a commit 75bd512

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/arp_response/arp_response.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ send_arp_reply(int port, struct rte_ether_addr *tha, uint32_t tip, struct onvm_n
249249
out_arp_hdr->arp_opcode = rte_cpu_to_be_16(RTE_ARP_OP_REPLY);
250250

251251
rte_ether_addr_copy(&ports->mac[port], &out_arp_hdr->arp_data.arp_sha);
252-
out_arp_hdr->arp_data.arp_sip = state_info->source_ips[ports->id[port]];
252+
out_arp_hdr->arp_data.arp_sip = rte_cpu_to_be_32(state_info->source_ips[ports->id[port]]);
253253

254254
out_arp_hdr->arp_data.arp_tip = tip;
255255
rte_ether_addr_copy(tha, &out_arp_hdr->arp_data.arp_tha);

0 commit comments

Comments
 (0)