Comments Inline....

On Thu, Dec 24, 2015 at 1:10 PM, Lou Berger <[email protected]> wrote:

> This is part of the core VPN and Encap SAFI changes.
>
> diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
> index 5330a22..20aaec6 100644
> --- a/bgpd/bgp_vty.c
> +++ b/bgpd/bgp_vty.c
> @@ -56,8 +56,15 @@ extern struct in_addr router_id_zebra;
>  afi_t
>  bgp_node_afi (struct vty *vty)
>  {
> -  if (vty->node == BGP_IPV6_NODE || vty->node == BGP_IPV6M_NODE)
> -    return AFI_IP6;
> +  switch (vty->node)
> +    {
> +    case BGP_IPV6_NODE:
> +    case BGP_IPV6M_NODE:
> +    case BGP_VPNV6_NODE:
> +      return AFI_IP6;
> +      break;
> +    }
> +
>    return AFI_IP;
>  }
>
>
The return AFI_IP should be inside of the switch statement with the correct
cases.



> @@ -66,6 +73,8 @@ bgp_node_afi (struct vty *vty)
>  safi_t
>  bgp_node_safi (struct vty *vty)
>  {
> +  if (vty->node == BGP_VPNV6_NODE)
> +    return SAFI_MPLS_VPN;
>    if (vty->node == BGP_VPNV4_NODE)
>      return SAFI_MPLS_VPN;
>

Should this be a switch statement as well?

Everything else looks good, though.

donald
_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to