summaryrefslogtreecommitdiffstats
path: root/src/vcl/vppcom.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vcl/vppcom.c')
-rw-r--r--src/vcl/vppcom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index ce222a77234..2e3af1b3526 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -3797,7 +3797,7 @@ vppcom_session_attr (uint32_t session_index, uint32_t op,
break;
case VPPCOM_ATTR_GET_PEER_ADDR:
- if (buffer && buflen && (*buflen >= sizeof (*ep)))
+ if (buffer && buflen && (*buflen >= sizeof (*ep)) && ep->ip)
{
ep->vrf = session->vrf;
ep->is_ip4 = session->peer_addr.is_ip4;
@@ -3821,7 +3821,7 @@ vppcom_session_attr (uint32_t session_index, uint32_t op,
break;
case VPPCOM_ATTR_GET_LCL_ADDR:
- if (buffer && buflen && (*buflen >= sizeof (*ep)))
+ if (buffer && buflen && (*buflen >= sizeof (*ep)) && ep->ip)
{
ep->vrf = session->vrf;
ep->is_ip4 = session->lcl_addr.is_ip4;