aboutsummaryrefslogtreecommitdiff
path: root/clients
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2015-11-26 23:06:21 +0100
committerAlexey Kardashevskiy <aik@ozlabs.ru>2015-12-01 17:02:04 +1100
commita2e7a5c2be8cc894aa985ddb1179a06dae69a343 (patch)
tree836951519b7b600611b40c63380143a8c3cdb667 /clients
parentb4c93802a5b2c72f096649c497ec9ff5708e4456 (diff)
downloadSLOF-a2e7a5c2be8cc894aa985ddb1179a06dae69a343.zip
SLOF-a2e7a5c2be8cc894aa985ddb1179a06dae69a343.tar.gz
SLOF-a2e7a5c2be8cc894aa985ddb1179a06dae69a343.tar.bz2
Fix tracking of pending outgoing packets when handling ARP replies
pending_pkt.pkt_pending is never read, thus setting it to 0 in handle_arp() does not make much sense. On the other hand, arp_table[i].pkt_pending is never set back to 0, but it is checked for tracking which packets still have to be sent in handle_arp(), thus we might send out the same queued packet multiple times when receiving more than one ARP packet from the other side. So setting "pending_pkt.pkt_pending = 0" seems to be a typo, and "arp_table[i].pkt_pending = 0" should be right instead. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Diffstat (limited to 'clients')
-rw-r--r--clients/net-snk/app/netlib/ipv4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/clients/net-snk/app/netlib/ipv4.c b/clients/net-snk/app/netlib/ipv4.c
index 8185de5..ee16b3d 100644
--- a/clients/net-snk/app/netlib/ipv4.c
+++ b/clients/net-snk/app/netlib/ipv4.c
@@ -758,7 +758,7 @@ handle_arp(int fd, uint8_t * packet, int32_t packetsize)
memcpy(ethh -> dest_mac, arp_table[i].mac_addr, 6);
send_ether(fd, pending_pkt.eth_frame, pending_pkt.eth_len);
- pending_pkt.pkt_pending = 0;
+ arp_table[i].pkt_pending = 0;
arp_table[i].eth_len = 0;
}
return 0; // no error