|
|
f9401c |
From 23490cbf50a9ad62d480a0916c6d0ca61d221afb Mon Sep 17 00:00:00 2001
|
|
|
f9401c |
From: Hangbin Liu <haliu@redhat.com>
|
|
|
f9401c |
Date: Mon, 2 Sep 2019 19:39:36 +0800
|
|
|
f9401c |
Subject: [PATCH 04/04] libndp: fix nd_msg typo when setting target address
|
|
|
f9401c |
|
|
|
f9401c |
When setting the target address of nd_msg, I set the ns/na type reversed.
|
|
|
f9401c |
|
|
|
f9401c |
Fixes: acccd780df517 ("ndptool: add -T target support")
|
|
|
f9401c |
Signed-off-by: Hangbin Liu <haliu@redhat.com>
|
|
|
f9401c |
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
|
|
|
f9401c |
---
|
|
|
f9401c |
libndp/libndp.c | 4 ++--
|
|
|
f9401c |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
f9401c |
|
|
|
f9401c |
diff --git a/libndp/libndp.c b/libndp/libndp.c
|
|
|
f9401c |
index f327d45..8b7de6b 100644
|
|
|
f9401c |
--- a/libndp/libndp.c
|
|
|
f9401c |
+++ b/libndp/libndp.c
|
|
|
f9401c |
@@ -713,7 +713,7 @@ void ndp_msg_target_set(struct ndp_msg *msg, struct in6_addr *target)
|
|
|
f9401c |
enum ndp_msg_type msg_type = ndp_msg_type(msg);
|
|
|
f9401c |
switch (msg_type) {
|
|
|
f9401c |
case NDP_MSG_NS:
|
|
|
f9401c |
- ((struct ndp_msgna*)&msg->nd_msg)->na->nd_na_target = *target;
|
|
|
f9401c |
+ ((struct ndp_msgns*)&msg->nd_msg)->ns->nd_ns_target = *target;
|
|
|
f9401c |
/*
|
|
|
f9401c |
* Neighbor Solicitations are multicast when the node
|
|
|
f9401c |
* needs to resolve an address and unicast when the
|
|
|
f9401c |
@@ -727,7 +727,7 @@ void ndp_msg_target_set(struct ndp_msg *msg, struct in6_addr *target)
|
|
|
f9401c |
ndp_msg_addrto_adjust_solicit_multi(&msg->addrto, target);
|
|
|
f9401c |
break;
|
|
|
f9401c |
case NDP_MSG_NA:
|
|
|
f9401c |
- ((struct ndp_msgns*)&msg->nd_msg)->ns->nd_ns_target = *target;
|
|
|
f9401c |
+ ((struct ndp_msgna*)&msg->nd_msg)->na->nd_na_target = *target;
|
|
|
f9401c |
break;
|
|
|
f9401c |
default:
|
|
|
f9401c |
break;
|
|
|
f9401c |
--
|
|
|
f9401c |
2.19.2
|
|
|
f9401c |
|