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.
This commit is contained in:
Sylvain Rochet 2015-02-22 01:34:47 +01:00
parent 814bcc04ad
commit 5680808fb6

View File

@ -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. */