From 5680808fb6f80d2bc17efd850589cfdb365d5a15 Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Sun, 22 Feb 2015 01:34:47 +0100 Subject: [PATCH] PPP, CORE, ppp_ioctl PPPCTLG_UPSTATUS command now returns true if only IPv6 is up PPPCTLG_UPSTATUS ioctl didn't return true if IPv6 was up and IPv4 down, fixed. --- src/netif/ppp/ppp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index 65bbde0f..a5a85262 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -351,7 +351,11 @@ ppp_ioctl(ppp_pcb *pcb, u8_t cmd, void *arg) if (!arg) { goto fail; } - *(int *)arg = (int)(pcb->if_up); + *(int *)arg = (int)(pcb->if_up +#if PPP_IPV6_SUPPORT + || pcb->if6_up +#endif /* PPP_IPV6_SUPPORT */ + ); return ERR_OK; case PPPCTLG_ERRCODE: /* Get the PPP error code. */