summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/command.c3
-rw-r--r--lib/ipaddr.h6
-rw-r--r--lib/zclient.c4
-rw-r--r--lib/zebra.h2
4 files changed, 13 insertions, 2 deletions
diff --git a/lib/command.c b/lib/command.c
index 10996d5dd4..3fa086bf62 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -500,6 +500,9 @@ static int config_write_host(struct vty *vty)
if (cmd_hostname_get())
vty_out(vty, "hostname %s\n", cmd_hostname_get());
+ if (cmd_domainname_get())
+ vty_out(vty, "domainname %s\n", cmd_domainname_get());
+
if (host.encrypt) {
if (host.password_encrypt)
vty_out(vty, "password 8 %s\n", host.password_encrypt);
diff --git a/lib/ipaddr.h b/lib/ipaddr.h
index e8dbe9cf09..44bde45add 100644
--- a/lib/ipaddr.h
+++ b/lib/ipaddr.h
@@ -86,6 +86,12 @@ static inline char *ipaddr2str(struct ipaddr *ip, char *buf, int size)
return buf;
}
+/*
+ * Convert IPv4 address to IPv4-mapped IPv6 address which is of the
+ * form ::FFFF:<IPv4 address> (RFC 4291). This IPv6 address can then
+ * be used to represent the IPv4 address, wherever only an IPv6 address
+ * is required.
+ */
static inline void ipv4_to_ipv4_mapped_ipv6(struct in6_addr *in6,
struct in_addr in)
{
diff --git a/lib/zclient.c b/lib/zclient.c
index ad91eb504b..8535c3b5f5 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -1085,7 +1085,7 @@ int zapi_route_decode(struct stream *s, struct zapi_route *api)
STREAM_GETC(s, api->message);
STREAM_GETC(s, api->safi);
if (CHECK_FLAG(api->flags, ZEBRA_FLAG_EVPN_ROUTE))
- stream_get(&(api->rmac), s, sizeof(struct ethaddr));
+ STREAM_GET(&(api->rmac), s, sizeof(struct ethaddr));
/* Prefix. */
STREAM_GETC(s, api->prefix.family);
@@ -1266,6 +1266,8 @@ bool zapi_nexthop_update_decode(struct stream *s, struct zapi_route *nhr)
break;
}
+ STREAM_GETC(s, nhr->type);
+ STREAM_GETW(s, nhr->instance);
STREAM_GETC(s, nhr->distance);
STREAM_GETL(s, nhr->metric);
STREAM_GETC(s, nhr->nexthop_num);
diff --git a/lib/zebra.h b/lib/zebra.h
index b9a795d160..11bf764b63 100644
--- a/lib/zebra.h
+++ b/lib/zebra.h
@@ -402,7 +402,7 @@ extern const char *zserv_command_string(unsigned int command);
#define strmatch(a,b) (!strcmp((a), (b)))
/* Zebra message flags */
-#define ZEBRA_FLAG_INTERNAL 0x01
+#define ZEBRA_FLAG_ALLOW_RECURSION 0x01
#define ZEBRA_FLAG_SELFROUTE 0x02
#define ZEBRA_FLAG_IBGP 0x08
#define ZEBRA_FLAG_SELECTED 0x10