zebra: Collapse struct static_ipv[4|6] into struct static_route
The 'struct static_ipv4' and 'struct static_ipv6' structures
are essentially the same. Collapse them into one data structure
'struct static_route'.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index b37b901..656f55d 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -2396,7 +2396,7 @@
static_config_ipv4 (struct vty *vty, safi_t safi, const char *cmd)
{
struct route_node *rn;
- struct static_ipv4 *si;
+ struct static_route *si;
struct route_table *stable;
struct zebra_vrf *zvrf;
vrf_iter_t iter;
@@ -2419,10 +2419,10 @@
switch (si->type)
{
case STATIC_IPV4_GATEWAY:
- vty_out (vty, " %s", inet_ntoa (si->gate.ipv4));
+ vty_out (vty, " %s", inet_ntoa (si->addr.ipv4));
break;
case STATIC_IPV4_IFNAME:
- vty_out (vty, " %s", si->gate.ifname);
+ vty_out (vty, " %s", si->ifname);
break;
case STATIC_IPV4_BLACKHOLE:
vty_out (vty, " Null0");
@@ -3727,7 +3727,7 @@
static_config_ipv6 (struct vty *vty)
{
struct route_node *rn;
- struct static_ipv6 *si;
+ struct static_route *si;
int write;
char buf[BUFSIZ];
struct route_table *stable;
@@ -3751,14 +3751,14 @@
{
case STATIC_IPV6_GATEWAY:
vty_out (vty, " %s",
- inet_ntop (AF_INET6, &si->ipv6, buf, BUFSIZ));
+ inet_ntop (AF_INET6, &si->addr.ipv6, buf, BUFSIZ));
break;
case STATIC_IPV6_IFNAME:
vty_out (vty, " %s", si->ifname);
break;
case STATIC_IPV6_GATEWAY_IFNAME:
vty_out (vty, " %s %s",
- inet_ntop (AF_INET6, &si->ipv6, buf, BUFSIZ),
+ inet_ntop (AF_INET6, &si->addr.ipv6, buf, BUFSIZ),
si->ifname);
break;
}