summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure.ac3
-rw-r--r--zebra/rtadv.c8
-rw-r--r--zebra/rtadv.h10
3 files changed, 12 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 9c47b5b4..1785ec2f 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1316,7 +1316,8 @@ AC_CHECK_TYPES([struct sockaddr, struct sockaddr_in,
socklen_t,
struct ifaliasreq, struct if6_aliasreq, struct in6_aliasreq,
struct nd_opt_adv_interval, struct rt_addrinfo,
- struct nd_opt_homeagent_info, struct nd_opt_adv_interval],
+ struct nd_opt_homeagent_info, struct nd_opt_adv_interval,
+ struct nd_opt_rdnss],
[], [], QUAGGA_INCLUDES)
AC_CHECK_MEMBERS([struct sockaddr.sa_len,
diff --git a/zebra/rtadv.c b/zebra/rtadv.c
index 7d9c0f6c..e8c223f2 100644
--- a/zebra/rtadv.c
+++ b/zebra/rtadv.c
@@ -241,9 +241,9 @@ rtadv_send_packet (int sock, struct interface *ifp)
unsigned int rdnss_entries = 1;
ndopt_rdnss = (struct nd_opt_rdnss *) (buf + len);
- ndopt_rdnss->nd_opt_type = ND_OPT_RDNSS;
- ndopt_rdnss->nd_opt_reserved = 0;
- ndopt_rdnss->nd_opt_lifetime = htonl(zif->rtadv.AdvRDNSSLifetime);
+ ndopt_rdnss->nd_opt_rdnss_type = ND_OPT_RDNSS;
+ ndopt_rdnss->nd_opt_rdnss_reserved = 0;
+ ndopt_rdnss->nd_opt_rdnss_lifetime = htonl(zif->rtadv.AdvRDNSSLifetime);
len += sizeof(struct nd_opt_rdnss);
@@ -256,7 +256,7 @@ rtadv_send_packet (int sock, struct interface *ifp)
rdnss_entries += 2;
}
- ndopt_rdnss->nd_opt_len = rdnss_entries;
+ ndopt_rdnss->nd_opt_rdnss_len = rdnss_entries;
}
if (zif->rtadv.AdvIntervalOption)
diff --git a/zebra/rtadv.h b/zebra/rtadv.h
index 0893ba53..6bd342e3 100644
--- a/zebra/rtadv.h
+++ b/zebra/rtadv.h
@@ -97,14 +97,16 @@ struct nd_opt_homeagent_info { /* Home Agent info */
} __attribute__((__packed__));
#endif
+#ifndef HAVE_STRUCT_ND_OPT_RDNSS
/* see RFC 5006, section 5.1 */
struct nd_opt_rdnss {
- uint8_t nd_opt_type;
- uint8_t nd_opt_len;
- uint16_t nd_opt_reserved;
- uint32_t nd_opt_lifetime;
+ uint8_t nd_opt_rdnss_type;
+ uint8_t nd_opt_rdnss_len;
+ uint16_t nd_opt_rdnss_reserved;
+ uint32_t nd_opt_rdnss_lifetime;
/* followed by n (16 byte) entries */
} __attribute__((__packed__));
+#endif
extern const char *rtadv_pref_strs[];