diff options
author | Hangbin Liu <haliu@redhat.com> | 2019-09-02 19:39:36 +0800 |
---|---|---|
committer | Jiri Pirko <jiri@mellanox.com> | 2019-09-12 08:40:26 +0200 |
commit | 23490cbf50a9ad62d480a0916c6d0ca61d221afb (patch) | |
tree | 53c945b685d31fc1569ba9aea9cdeb3c37e66e8c | |
parent | 81df977dc0c2a04d5fa0c18dee130490d84a92f5 (diff) | |
download | libndp-23490cbf50a9ad62d480a0916c6d0ca61d221afb.tar.gz |
libndp: fix nd_msg typo when setting target address
When setting the target address of nd_msg, I set the ns/na type reversed.
Fixes: acccd780df517 ("ndptool: add -T target support")
Signed-off-by: Hangbin Liu <haliu@redhat.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
-rw-r--r-- | libndp/libndp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libndp/libndp.c b/libndp/libndp.c index f327d45..8b7de6b 100644 --- a/libndp/libndp.c +++ b/libndp/libndp.c @@ -713,7 +713,7 @@ void ndp_msg_target_set(struct ndp_msg *msg, struct in6_addr *target) enum ndp_msg_type msg_type = ndp_msg_type(msg); switch (msg_type) { case NDP_MSG_NS: - ((struct ndp_msgna*)&msg->nd_msg)->na->nd_na_target = *target; + ((struct ndp_msgns*)&msg->nd_msg)->ns->nd_ns_target = *target; /* * Neighbor Solicitations are multicast when the node * needs to resolve an address and unicast when the @@ -727,7 +727,7 @@ void ndp_msg_target_set(struct ndp_msg *msg, struct in6_addr *target) ndp_msg_addrto_adjust_solicit_multi(&msg->addrto, target); break; case NDP_MSG_NA: - ((struct ndp_msgns*)&msg->nd_msg)->ns->nd_ns_target = *target; + ((struct ndp_msgna*)&msg->nd_msg)->na->nd_na_target = *target; break; default: break; |