diff --git a/features/FEATURE_LWIP/lwip-interface/ppp_lwip.cpp b/features/FEATURE_LWIP/lwip-interface/ppp_lwip.cpp index 97fe9feb919..cea781badd4 100644 --- a/features/FEATURE_LWIP/lwip-interface/ppp_lwip.cpp +++ b/features/FEATURE_LWIP/lwip-interface/ppp_lwip.cpp @@ -452,7 +452,7 @@ const char *nsapi_ppp_get_gw_addr(FileHandle *stream) static char gwaddr[IPADDR_STRLEN_MAX]; if (stream == my_stream) { - if (my_interface->get_netmask(gwaddr, IPADDR_STRLEN_MAX)) { + if (my_interface->get_gateway(gwaddr, IPADDR_STRLEN_MAX)) { return gwaddr; } } diff --git a/features/netsocket/cellular/generic_modem_driver/PPPCellularInterface.cpp b/features/netsocket/cellular/generic_modem_driver/PPPCellularInterface.cpp index 76a5ed288f5..455ef42bb07 100644 --- a/features/netsocket/cellular/generic_modem_driver/PPPCellularInterface.cpp +++ b/features/netsocket/cellular/generic_modem_driver/PPPCellularInterface.cpp @@ -749,7 +749,7 @@ const char *PPPCellularInterface::get_netmask() const char *PPPCellularInterface::get_gateway() { - return nsapi_ppp_get_ip_addr(_fh); + return nsapi_ppp_get_gw_addr(_fh); } /** Power down modem