|
|
e88930 |
From: Chris Leech <cleech@redhat.com>
|
|
|
e88930 |
Subject: iscsiuio: fix dhcpv6 transaction-id mismatch error
|
|
|
e88930 |
|
|
|
e88930 |
Bugzilla: ZZZ
|
|
|
e88930 |
Upstream Status:
|
|
|
e88930 |
Build Info: XXX
|
|
|
e88930 |
Tested:
|
|
|
e88930 |
|
|
|
e88930 |
commit 5fd6428435f3063b4e980ead1fe0671856a20183
|
|
|
e88930 |
Author: Nilesh Javali <nilesh.javali@cavium.com>
|
|
|
e88930 |
Date: Thu Feb 16 08:44:19 2017 -0500
|
|
|
e88930 |
|
|
|
e88930 |
iscsiuio: fix dhcpv6 transaction-id mismatch error
|
|
|
e88930 |
|
|
|
e88930 |
Initialize the transaction-id within the dhcpv6 packet with
|
|
|
e88930 |
correct byte order.
|
|
|
e88930 |
|
|
|
e88930 |
Signed-off-by: Nilesh Javali <nilesh.javali@cavium.com>
|
|
|
e88930 |
---
|
|
|
e88930 |
iscsiuio/src/apps/dhcpc/dhcpv6.c | 9 +++++++--
|
|
|
e88930 |
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
|
e88930 |
|
|
|
e88930 |
diff --git a/iscsiuio/src/apps/dhcpc/dhcpv6.c b/iscsiuio/src/apps/dhcpc/dhcpv6.c
|
|
|
e88930 |
index a4e25f0bdbbd..461af0ec2a11 100644
|
|
|
e88930 |
--- a/iscsiuio/src/apps/dhcpc/dhcpv6.c
|
|
|
e88930 |
+++ b/iscsiuio/src/apps/dhcpc/dhcpv6.c
|
|
|
e88930 |
@@ -153,7 +153,7 @@ static u16_t dhcpv6_init_packet(struct dhcpv6_context *context, u8_t type)
|
|
|
e88930 |
if (dhcpv6->dhcpv6_type != type)
|
|
|
e88930 |
context->dhcpv6_transaction_id++;
|
|
|
e88930 |
|
|
|
e88930 |
- dhcpv6->dhcpv6_trans_id = context->dhcpv6_transaction_id;
|
|
|
e88930 |
+ dhcpv6->dhcpv6_trans_id = HOST_TO_NET16(context->dhcpv6_transaction_id);
|
|
|
e88930 |
dhcpv6->dhcpv6_type = type;
|
|
|
e88930 |
|
|
|
e88930 |
/* Keep track of length of all DHCP options. */
|
|
|
e88930 |
@@ -265,8 +265,13 @@ void ipv6_udp_handle_dhcp(struct dhcpv6_context *context)
|
|
|
e88930 |
dhcpv6 = (union dhcpv6_hdr *)((u8_t *)context->udp +
|
|
|
e88930 |
sizeof(struct udp_hdr));
|
|
|
e88930 |
|
|
|
e88930 |
- if (dhcpv6->dhcpv6_trans_id != context->dhcpv6_transaction_id)
|
|
|
e88930 |
+ if (dhcpv6->dhcpv6_trans_id !=
|
|
|
e88930 |
+ HOST_TO_NET16(context->dhcpv6_transaction_id)) {
|
|
|
e88930 |
+ LOG_ERR("DHCPv6 transaction-id error, sent %x, received %x",
|
|
|
e88930 |
+ HOST_TO_NET16(context->dhcpv6_transaction_id),
|
|
|
e88930 |
+ dhcpv6->dhcpv6_trans_id);
|
|
|
e88930 |
return;
|
|
|
e88930 |
+ }
|
|
|
e88930 |
|
|
|
e88930 |
dhcpv6_len =
|
|
|
e88930 |
NET_TO_HOST16(context->udp->length) - sizeof(struct udp_hdr);
|