return 0;
break;
case NEXTHOP_TYPE_IFINDEX:
- case NEXTHOP_TYPE_IFNAME:
if (next1->ifindex != next2->ifindex)
return 0;
break;
-#ifdef HAVE_IPV6
case NEXTHOP_TYPE_IPV6:
if (! IPV6_ADDR_SAME (&next1->gate.ipv6, &next2->gate.ipv6))
return 0;
break;
case NEXTHOP_TYPE_IPV6_IFINDEX:
- case NEXTHOP_TYPE_IPV6_IFNAME:
if (! IPV6_ADDR_SAME (&next1->gate.ipv6, &next2->gate.ipv6))
return 0;
if (next1->ifindex != next2->ifindex)
return 0;
break;
-#endif /* HAVE_IPV6 */
default:
/* do nothing */
break;
nexthop->flags = nh->flags;
nexthop->type = nh->type;
nexthop->ifindex = nh->ifindex;
- if (nh->ifname)
- nexthop->ifname = XSTRDUP(0, nh->ifname);
memcpy(&(nexthop->gate), &(nh->gate), sizeof(union g_addr));
memcpy(&(nexthop->src), &(nh->src), sizeof(union g_addr));
nexthop_add(tnh, nexthop);
void
nexthop_free (struct nexthop *nexthop)
{
- if (nexthop->ifname)
- XFREE (0, nexthop->ifname);
if (nexthop->resolved)
nexthops_free(nexthop->resolved);
XFREE (MTYPE_NEXTHOP, nexthop);
enum nexthop_types_t
{
NEXTHOP_TYPE_IFINDEX = 1, /* Directly connected. */
- NEXTHOP_TYPE_IFNAME, /* Interface route. */
NEXTHOP_TYPE_IPV4, /* IPv4 nexthop. */
NEXTHOP_TYPE_IPV4_IFINDEX, /* IPv4 nexthop with ifindex. */
- NEXTHOP_TYPE_IPV4_IFNAME, /* IPv4 nexthop with ifname. */
NEXTHOP_TYPE_IPV6, /* IPv6 nexthop. */
NEXTHOP_TYPE_IPV6_IFINDEX, /* IPv6 nexthop with ifindex. */
- NEXTHOP_TYPE_IPV6_IFNAME, /* IPv6 nexthop with ifname. */
NEXTHOP_TYPE_BLACKHOLE, /* Null0 nexthop. */
};
struct nexthop *prev;
/* Interface index. */
- char *ifname;
unsigned int ifindex;
enum nexthop_types_t type;
/* Zebra nexthop flags. */
#define ZEBRA_NEXTHOP_IFINDEX 1
-#define ZEBRA_NEXTHOP_IFNAME 2
-#define ZEBRA_NEXTHOP_IPV4 3
-#define ZEBRA_NEXTHOP_IPV4_IFINDEX 4
-#define ZEBRA_NEXTHOP_IPV4_IFNAME 5
-#define ZEBRA_NEXTHOP_IPV6 6
-#define ZEBRA_NEXTHOP_IPV6_IFINDEX 7
-#define ZEBRA_NEXTHOP_IPV6_IFNAME 8
-#define ZEBRA_NEXTHOP_BLACKHOLE 9
-#define ZEBRA_NEXTHOP_IPV4_ONLINK 10
+#define ZEBRA_NEXTHOP_IPV4 2
+#define ZEBRA_NEXTHOP_IPV4_IFINDEX 3
+#define ZEBRA_NEXTHOP_IPV6 4
+#define ZEBRA_NEXTHOP_IPV6_IFINDEX 5
+#define ZEBRA_NEXTHOP_BLACKHOLE 6
+#define ZEBRA_NEXTHOP_IPV4_ONLINK 7
#ifndef INADDR_LOOPBACK
#define INADDR_LOOPBACK 0x7f000001 /* Internet address 127.0.0.1. */
} rib_tables_iter_t;
extern struct nexthop *rib_nexthop_ifindex_add (struct rib *, unsigned int);
-extern struct nexthop *rib_nexthop_ifname_add (struct rib *, char *);
extern struct nexthop *rib_nexthop_blackhole_add (struct rib *);
extern struct nexthop *rib_nexthop_ipv4_add (struct rib *, struct in_addr *,
struct in_addr *);
extern struct nexthop *rib_nexthop_ipv6_ifindex_add (struct rib *rib,
struct in6_addr *ipv6,
unsigned int ifindex);
-extern struct nexthop *rib_nexthop_ipv6_ifname_add (struct rib *rib,
- struct in6_addr *ipv6,
- char *ifname);
extern struct zebra_vrf *zebra_vrf_lookup (vrf_id_t vrf_id);
extern struct zebra_vrf *zebra_vrf_alloc (vrf_id_t);
if (rtmsg->rtm_family == AF_INET &&
(nexthop->type == NEXTHOP_TYPE_IPV6
- || nexthop->type == NEXTHOP_TYPE_IPV6_IFNAME
|| nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX))
{
char buf[16] = "169.254.0.1";
inet_ntoa (nexthop->gate.ipv4),
nexthop->ifindex);
}
-#ifdef HAVE_IPV6
if (nexthop->type == NEXTHOP_TYPE_IPV6
- || nexthop->type == NEXTHOP_TYPE_IPV6_IFNAME
|| nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX)
{
addattr_l (nlmsg, req_size, RTA_GATEWAY,
inet6_ntoa (nexthop->gate.ipv6),
nexthop->ifindex);
}
-#endif /* HAVE_IPV6 */
if (nexthop->type == NEXTHOP_TYPE_IFINDEX
- || nexthop->type == NEXTHOP_TYPE_IFNAME
|| nexthop->type == NEXTHOP_TYPE_IPV4_IFINDEX)
{
addattr32 (nlmsg, req_size, RTA_OIF, nexthop->ifindex);
"nexthop via if %u", routedesc, nexthop->ifindex);
}
- if (nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX
- || nexthop->type == NEXTHOP_TYPE_IPV6_IFNAME)
+ if (nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX)
{
addattr32 (nlmsg, req_size, RTA_OIF, nexthop->ifindex);
if (rtmsg->rtm_family == AF_INET &&
(nexthop->type == NEXTHOP_TYPE_IPV6
- || nexthop->type == NEXTHOP_TYPE_IPV6_IFNAME
|| nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX))
{
char buf[16] = "169.254.0.1";
inet_ntoa (nexthop->gate.ipv4),
nexthop->ifindex);
}
-#ifdef HAVE_IPV6
if (nexthop->type == NEXTHOP_TYPE_IPV6
- || nexthop->type == NEXTHOP_TYPE_IPV6_IFNAME
|| nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX)
{
rta_addattr_l (rta, NL_PKT_BUF_SIZE, RTA_GATEWAY,
inet6_ntoa (nexthop->gate.ipv6),
nexthop->ifindex);
}
-#endif /* HAVE_IPV6 */
/* ifindex */
if (nexthop->type == NEXTHOP_TYPE_IPV4_IFINDEX
- || nexthop->type == NEXTHOP_TYPE_IFINDEX
- || nexthop->type == NEXTHOP_TYPE_IFNAME)
+ || nexthop->type == NEXTHOP_TYPE_IFINDEX)
{
rtnh->rtnh_ifindex = nexthop->ifindex;
zlog_debug("netlink_route_multipath() (%s): "
"nexthop via if %u", routedesc, nexthop->ifindex);
}
- else if (nexthop->type == NEXTHOP_TYPE_IPV6_IFNAME
- || nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX)
+ else if (nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX)
{
rtnh->rtnh_ifindex = nexthop->ifindex;
gate = 1;
}
if (nexthop->type == NEXTHOP_TYPE_IFINDEX
- || nexthop->type == NEXTHOP_TYPE_IFNAME
|| nexthop->type == NEXTHOP_TYPE_IPV4_IFINDEX)
ifindex = nexthop->ifindex;
if (nexthop->type == NEXTHOP_TYPE_BLACKHOLE)
))
{
if (nexthop->type == NEXTHOP_TYPE_IPV6
- || nexthop->type == NEXTHOP_TYPE_IPV6_IFNAME
|| nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX)
{
sin_gate.sin6_addr = nexthop->gate.ipv6;
gate = 1;
}
if (nexthop->type == NEXTHOP_TYPE_IFINDEX
- || nexthop->type == NEXTHOP_TYPE_IFNAME
- || nexthop->type == NEXTHOP_TYPE_IPV6_IFNAME
|| nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX)
ifindex = nexthop->ifindex;
src = &nexthop->src;
}
-#ifdef HAVE_IPV6
if (nexthop->type == NEXTHOP_TYPE_IPV6
- || nexthop->type == NEXTHOP_TYPE_IPV6_IFNAME
|| nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX)
{
nhi.gateway = &nexthop->gate;
}
-#endif /* HAVE_IPV6 */
- if (nexthop->type == NEXTHOP_TYPE_IFINDEX
- || nexthop->type == NEXTHOP_TYPE_IFNAME)
+ if (nexthop->type == NEXTHOP_TYPE_IFINDEX)
{
if (nexthop->src.ipv4.s_addr)
src = &nexthop->src;
nexthop->flags = nh->flags;
nexthop->type = nh->type;
nexthop->ifindex = nh->ifindex;
- if (nh->ifname)
- nexthop->ifname = XSTRDUP(0, nh->ifname);
memcpy(&(nexthop->gate), &(nh->gate), sizeof(union g_addr));
memcpy(&(nexthop->src), &(nh->src), sizeof(union g_addr));
rib_nexthop_add(rib, nexthop);
return nexthop;
}
-struct nexthop *
-rib_nexthop_ifname_add (struct rib *rib, char *ifname)
-{
- struct nexthop *nexthop;
-
- nexthop = nexthop_new();
- nexthop->type = NEXTHOP_TYPE_IFNAME;
- nexthop->ifname = XSTRDUP (0, ifname);
-
- rib_nexthop_add (rib, nexthop);
-
- return nexthop;
-}
-
struct nexthop *
rib_nexthop_ipv4_add (struct rib *rib, struct in_addr *ipv4, struct in_addr *src)
{
SET_FLAG (resolved_hop->flags, NEXTHOP_FLAG_ACTIVE);
/* If the resolving route specifies a gateway, use it */
if (newhop->type == NEXTHOP_TYPE_IPV4
- || newhop->type == NEXTHOP_TYPE_IPV4_IFINDEX
- || newhop->type == NEXTHOP_TYPE_IPV4_IFNAME)
+ || newhop->type == NEXTHOP_TYPE_IPV4_IFINDEX)
{
resolved_hop->type = newhop->type;
resolved_hop->gate.ipv4 = newhop->gate.ipv4;
*
* On Linux, we have to set the onlink netlink flag because
* otherwise, the kernel won't accept the route. */
- if (newhop->type == NEXTHOP_TYPE_IFINDEX
- || newhop->type == NEXTHOP_TYPE_IFNAME)
+ if (newhop->type == NEXTHOP_TYPE_IFINDEX)
{
resolved_hop->flags |= NEXTHOP_FLAG_ONLINK;
resolved_hop->type = NEXTHOP_TYPE_IPV4_IFINDEX;
SET_FLAG (resolved_hop->flags, NEXTHOP_FLAG_ACTIVE);
/* If the resolving route specifies a gateway, use it */
if (newhop->type == NEXTHOP_TYPE_IPV4
- || newhop->type == NEXTHOP_TYPE_IPV4_IFINDEX
- || newhop->type == NEXTHOP_TYPE_IPV4_IFNAME)
+ || newhop->type == NEXTHOP_TYPE_IPV4_IFINDEX)
{
resolved_hop->type = newhop->type;
resolved_hop->gate.ipv4 = newhop->gate.ipv4;
* On Linux, we have to set the onlink netlink flag because
* otherwise, the kernel won't accept the route.
*/
- if (newhop->type == NEXTHOP_TYPE_IFINDEX
- || newhop->type == NEXTHOP_TYPE_IFNAME)
+ if (newhop->type == NEXTHOP_TYPE_IFINDEX)
{
resolved_hop->flags |= NEXTHOP_FLAG_ONLINK;
resolved_hop->type = NEXTHOP_TYPE_IPV4_IFINDEX;
/* See nexthop_active_ipv4 for a description how the
* resolved nexthop is constructed. */
if (newhop->type == NEXTHOP_TYPE_IPV6
- || newhop->type == NEXTHOP_TYPE_IPV6_IFINDEX
- || newhop->type == NEXTHOP_TYPE_IPV6_IFNAME)
+ || newhop->type == NEXTHOP_TYPE_IPV6_IFINDEX)
{
resolved_hop->type = newhop->type;
resolved_hop->gate.ipv6 = newhop->gate.ipv6;
}
}
- if (newhop->type == NEXTHOP_TYPE_IFINDEX
- || newhop->type == NEXTHOP_TYPE_IFNAME)
+ if (newhop->type == NEXTHOP_TYPE_IFINDEX)
{
resolved_hop->flags |= NEXTHOP_FLAG_ONLINK;
resolved_hop->type = NEXTHOP_TYPE_IPV6_IFINDEX;
/* See nexthop_active_ipv4 for a description how the
* resolved nexthop is constructed. */
if (newhop->type == NEXTHOP_TYPE_IPV6
- || newhop->type == NEXTHOP_TYPE_IPV6_IFINDEX
- || newhop->type == NEXTHOP_TYPE_IPV6_IFNAME)
+ || newhop->type == NEXTHOP_TYPE_IPV6_IFINDEX)
{
resolved_hop->type = newhop->type;
resolved_hop->gate.ipv6 = newhop->gate.ipv6;
}
}
- if (newhop->type == NEXTHOP_TYPE_IFINDEX
- || newhop->type == NEXTHOP_TYPE_IFNAME)
+ if (newhop->type == NEXTHOP_TYPE_IFINDEX)
{
resolved_hop->flags |= NEXTHOP_FLAG_ONLINK;
resolved_hop->type = NEXTHOP_TYPE_IPV6_IFINDEX;
else
UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE);
break;
- case NEXTHOP_TYPE_IPV6_IFNAME:
- family = AFI_IP6;
- case NEXTHOP_TYPE_IFNAME:
- ifp = if_lookup_by_name_vrf (nexthop->ifname, rib->vrf_id);
- if (ifp && if_is_operative(ifp))
- {
- if (set)
- nexthop->ifindex = ifp->ifindex;
- SET_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE);
- }
- else
- {
- if (set)
- nexthop->ifindex = 0;
- UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE);
- }
- break;
case NEXTHOP_TYPE_IPV4:
case NEXTHOP_TYPE_IPV4_IFINDEX:
family = AFI_IP;
{
inet_ntop (rn->p.family, &rn->p.u.prefix, buf, sizeof (buf));
zlog_debug("%u:%s/%d: Filtering out with NH out %s due to route map",
- rib->vrf_id, buf, rn->p.prefixlen, nexthop->ifname);
+ rib->vrf_id, buf, rn->p.prefixlen,
+ ifindex2ifname_vrf (nexthop->ifindex, rib->vrf_id));
}
UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE);
}
switch (nh_data->nexthop->type) {
case NEXTHOP_TYPE_IFINDEX:
- case NEXTHOP_TYPE_IFNAME:
/* Interface routes can't match ip next-hop */
return RMAP_NOMATCH;
case NEXTHOP_TYPE_IPV4_IFINDEX:
- case NEXTHOP_TYPE_IPV4_IFNAME:
case NEXTHOP_TYPE_IPV4:
p.family = AF_INET;
p.prefix = nh_data->nexthop->gate.ipv4;
switch (nh_data->nexthop->type) {
case NEXTHOP_TYPE_IFINDEX:
- case NEXTHOP_TYPE_IFNAME:
/* Interface routes can't match ip next-hop */
return RMAP_NOMATCH;
case NEXTHOP_TYPE_IPV4_IFINDEX:
- case NEXTHOP_TYPE_IPV4_IFNAME:
case NEXTHOP_TYPE_IPV4:
p.family = AF_INET;
p.prefix = nh_data->nexthop->gate.ipv4;
switch (nh_data->nexthop->type) {
case NEXTHOP_TYPE_IFINDEX:
- case NEXTHOP_TYPE_IFNAME:
/* Interface routes can't match ip next-hop */
return RMAP_NOMATCH;
case NEXTHOP_TYPE_IPV4_IFINDEX:
- case NEXTHOP_TYPE_IPV4_IFNAME:
case NEXTHOP_TYPE_IPV4:
p.family = AF_INET;
p.prefix = nh_data->nexthop->gate.ipv4;
return (u_char *)&nexthop->ifindex;
break;
case IPFORWARDTYPE:
- if (nexthop->type == NEXTHOP_TYPE_IFINDEX
- || nexthop->type == NEXTHOP_TYPE_IFNAME)
+ if (nexthop->type == NEXTHOP_TYPE_IFINDEX)
result = 3;
else
result = 4;
#ifdef HAVE_IPV6
case NEXTHOP_TYPE_IPV6:
case NEXTHOP_TYPE_IPV6_IFINDEX:
- case NEXTHOP_TYPE_IPV6_IFNAME:
vty_out (vty, " %s",
inet_ntop (AF_INET6, &nexthop->gate.ipv6, buf, BUFSIZ));
- if (nexthop->type == NEXTHOP_TYPE_IPV6_IFNAME)
- vty_out (vty, ", %s", nexthop->ifname);
- else if (nexthop->ifindex)
+ if (nexthop->ifindex)
vty_out (vty, ", via %s",
ifindex2ifname_vrf (nexthop->ifindex, rib->vrf_id));
break;
vty_out (vty, " directly connected, %s",
ifindex2ifname_vrf (nexthop->ifindex, rib->vrf_id));
break;
- case NEXTHOP_TYPE_IFNAME:
- vty_out (vty, " directly connected, %s", nexthop->ifname);
- break;
case NEXTHOP_TYPE_BLACKHOLE:
vty_out (vty, " directly connected, Null0");
break;
{
case NEXTHOP_TYPE_IPV4:
case NEXTHOP_TYPE_IPV4_IFINDEX:
- case NEXTHOP_TYPE_IPV4_IFNAME:
if (nexthop->src.ipv4.s_addr)
{
if (inet_ntop(AF_INET, &nexthop->src.ipv4, addrstr,
vty_out (vty, ", src %s", addrstr);
}
break;
-#ifdef HAVE_IPV6
case NEXTHOP_TYPE_IPV6:
case NEXTHOP_TYPE_IPV6_IFINDEX:
- case NEXTHOP_TYPE_IPV6_IFNAME:
if (!IPV6_ADDR_SAME(&nexthop->src.ipv6, &in6addr_any))
{
if (inet_ntop(AF_INET6, &nexthop->src.ipv6, addrstr,
vty_out (vty, ", src %s", addrstr);
}
break;
-#endif /* HAVE_IPV6 */
default:
break;
}
#ifdef HAVE_IPV6
case NEXTHOP_TYPE_IPV6:
case NEXTHOP_TYPE_IPV6_IFINDEX:
- case NEXTHOP_TYPE_IPV6_IFNAME:
vty_out (vty, " via %s",
inet_ntop (AF_INET6, &nexthop->gate.ipv6, buf, BUFSIZ));
- if (nexthop->type == NEXTHOP_TYPE_IPV6_IFNAME)
- vty_out (vty, ", %s", nexthop->ifname);
- else if (nexthop->ifindex)
+ if (nexthop->ifindex)
vty_out (vty, ", %s",
ifindex2ifname_vrf (nexthop->ifindex, rib->vrf_id));
break;
vty_out (vty, " is directly connected, %s",
ifindex2ifname_vrf (nexthop->ifindex, rib->vrf_id));
break;
- case NEXTHOP_TYPE_IFNAME:
- vty_out (vty, " is directly connected, %s", nexthop->ifname);
- break;
case NEXTHOP_TYPE_BLACKHOLE:
vty_out (vty, " is directly connected, Null0");
break;
{
case NEXTHOP_TYPE_IPV4:
case NEXTHOP_TYPE_IPV4_IFINDEX:
- case NEXTHOP_TYPE_IPV4_IFNAME:
if (nexthop->src.ipv4.s_addr)
{
if (inet_ntop(AF_INET, &nexthop->src.ipv4, buf, sizeof buf))
#ifdef HAVE_IPV6
case NEXTHOP_TYPE_IPV6:
case NEXTHOP_TYPE_IPV6_IFINDEX:
- case NEXTHOP_TYPE_IPV6_IFNAME:
if (!IPV6_ADDR_SAME(&nexthop->src.ipv6, &in6addr_any))
{
if (inet_ntop(AF_INET6, &nexthop->src.ipv6, buf, sizeof buf))
{
case NEXTHOP_TYPE_IPV6:
case NEXTHOP_TYPE_IPV6_IFINDEX:
- case NEXTHOP_TYPE_IPV6_IFNAME:
vty_out (vty, " %s",
inet_ntop (AF_INET6, &nexthop->gate.ipv6, buf, BUFSIZ));
- if (nexthop->type == NEXTHOP_TYPE_IPV6_IFNAME)
- vty_out (vty, ", %s", nexthop->ifname);
- else if (nexthop->ifindex)
+ if (nexthop->ifindex)
vty_out (vty, ", via %s", ifindex2ifname (nexthop->ifindex));
break;
case NEXTHOP_TYPE_IFINDEX:
vty_out (vty, " directly connected, %s",
ifindex2ifname (nexthop->ifindex));
break;
- case NEXTHOP_TYPE_IFNAME:
- vty_out (vty, " directly connected, %s",
- nexthop->ifname);
- break;
default:
break;
}
{
case NEXTHOP_TYPE_IPV6:
case NEXTHOP_TYPE_IPV6_IFINDEX:
- case NEXTHOP_TYPE_IPV6_IFNAME:
vty_out (vty, " via %s",
inet_ntop (AF_INET6, &nexthop->gate.ipv6, buf, BUFSIZ));
- if (nexthop->type == NEXTHOP_TYPE_IPV6_IFNAME)
- vty_out (vty, ", %s", nexthop->ifname);
- else if (nexthop->ifindex)
+ if (nexthop->ifindex)
vty_out (vty, ", %s", ifindex2ifname (nexthop->ifindex));
break;
case NEXTHOP_TYPE_IFINDEX:
vty_out (vty, " is directly connected, %s",
ifindex2ifname (nexthop->ifindex));
break;
- case NEXTHOP_TYPE_IFNAME:
- vty_out (vty, " is directly connected, %s",
- nexthop->ifname);
- break;
default:
break;
}
case NEXTHOP_TYPE_IPV4_IFINDEX:
stream_put_in_addr (s, &nexthop->gate.ipv4);
break;
-#ifdef HAVE_IPV6
case NEXTHOP_TYPE_IPV6:
case NEXTHOP_TYPE_IPV6_IFINDEX:
- case NEXTHOP_TYPE_IPV6_IFNAME:
/* Only BGP supports IPv4 prefix with IPv6 NH, so kill this */
if (p->family == AF_INET)
stream_put_in_addr(s, &dummy_nh.gate.ipv4);
else
stream_write (s, (u_char *) &nexthop->gate.ipv6, 16);
break;
-#endif
default:
if (cmd == ZEBRA_REDISTRIBUTE_IPV4_ADD
|| cmd == ZEBRA_REDISTRIBUTE_IPV4_DEL)
stream_put (s, &nexthop->gate.ipv6, 16);
break;
case ZEBRA_NEXTHOP_IPV6_IFINDEX:
- case ZEBRA_NEXTHOP_IPV6_IFNAME:
stream_put (s, &nexthop->gate.ipv6, 16);
stream_putl (s, nexthop->ifindex);
break;
case ZEBRA_NEXTHOP_IFINDEX:
- case ZEBRA_NEXTHOP_IFNAME:
stream_putl (s, nexthop->ifindex);
break;
default:
stream_putl (s, nexthop->ifindex);
break;
case ZEBRA_NEXTHOP_IFINDEX:
- case ZEBRA_NEXTHOP_IFNAME:
stream_putl (s, nexthop->ifindex);
break;
default:
stream_putl (s, nexthop->ifindex);
break;
case ZEBRA_NEXTHOP_IFINDEX:
- case ZEBRA_NEXTHOP_IFNAME:
stream_putl (s, nexthop->ifindex);
break;
default:
u_char nexthop_type;
struct stream *s;
unsigned int ifindex;
- u_char ifname_len;
safi_t safi;
int ret;
ifindex = stream_getl (s);
rib_nexthop_ifindex_add (rib, ifindex);
break;
- case ZEBRA_NEXTHOP_IFNAME:
- ifname_len = stream_getc (s);
- stream_forward_getp (s, ifname_len);
- break;
case ZEBRA_NEXTHOP_IPV4:
nexthop.s_addr = stream_get_ipv4 (s);
rib_nexthop_ipv4_add (rib, &nexthop, NULL);
struct prefix_ipv4 p;
u_char nexthop_num;
u_char nexthop_type;
- u_char ifname_len;
s = client->ibuf;
ifindex = 0;
case ZEBRA_NEXTHOP_IFINDEX:
ifindex = stream_getl (s);
break;
- case ZEBRA_NEXTHOP_IFNAME:
- ifname_len = stream_getc (s);
- stream_forward_getp (s, ifname_len);
- break;
case ZEBRA_NEXTHOP_IPV4:
nexthop.s_addr = stream_get_ipv4 (s);
nexthop_p = &nexthop;