Browse Source

ndp: fix endian issue

Fix endian issue introduced in commit 91a28e4 by using
ND_NA_FLAG_SOLICITED defined in netinet/icmp6.h

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Hans Dedecker 4 years ago
parent
commit
9a4531a431
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/ndp.c

+ 1 - 1
src/ndp.c

@@ -310,7 +310,7 @@ static void send_na(struct in6_addr *to_addr,
 	memset(pbuf, 0, sizeof(pbuf));
 	adv->nd_na_hdr = (struct icmp6_hdr) {
 		.icmp6_type = ND_NEIGHBOR_ADVERT,
-		.icmp6_dataun.icmp6_un_data32 = { 0x40000000L }
+		.icmp6_dataun.icmp6_un_data32 = { ND_NA_FLAG_SOLICITED }
 	};
 	adv->nd_na_target = *for_addr;
 	*opt = (struct nd_opt_hdr) { .nd_opt_type = ND_OPT_TARGET_LINKADDR, .nd_opt_len = 1 };