From c8958a5dd0f16ddee23e02fe9914287725b55427 Mon Sep 17 00:00:00 2001 From: PaulK Date: Sat, 14 Jan 2012 21:50:32 +0100 Subject: Fixed DNS configuration --- gprs.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gprs.c') diff --git a/gprs.c b/gprs.c index 0ef1d19..0437fe4 100644 --- a/gprs.c +++ b/gprs.c @@ -24,6 +24,7 @@ #define LOG_TAG "RIL-GPRS" #include +#include #include "samsung-ril.h" #include "util.h" @@ -124,6 +125,9 @@ void ipc_gprs_ip_configuration(struct ipc_message_info *info) char dns1[IP_STRING_SIZE]; char dns2[IP_STRING_SIZE]; + char dns_prop_name[PROPERTY_KEY_MAX]; + char gw_prop_name[PROPERTY_KEY_MAX]; + char *response[3]; int rc; @@ -152,6 +156,13 @@ void ipc_gprs_ip_configuration(struct ipc_message_info *info) inet_addr(dns2)); LOGD("ifc_configure: %d",rc); + snprintf(dns_prop_name, sizeof(dns_prop_name), "net.%s.dns1", INTERFACE); + property_set(dns_prop_name, dns1); + snprintf(dns_prop_name, sizeof(dns_prop_name), "net.%s.dns2", INTERFACE); + property_set(dns_prop_name, dns2); + snprintf(gw_prop_name, sizeof(gw_prop_name), "net.%s.gw", INTERFACE); + property_set(dns_prop_name, gateway); + response[0] = "0"; //FIXME: connection id response[1] = INTERFACE; response[2] = local_ip; -- cgit v1.1