#include <stdio.h>
#include <errno.h>
#include <unistd.h>
+#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
struct ifreq ifr;
struct rtentry rt;
struct sockaddr_in *addr;
+ char cmd[128];
int sk, err;
if ((iface->flags & CONNMAN_IFACE_FLAG_RTNL) == 0)
return -1;
}
+ sprintf(cmd, "echo \"nameserver %s\" | resolvconf -a %s",
+ inet_ntoa(ipv4->nameserver), ifr.ifr_name);
+
+ DBG("%s", cmd);
+
+ system(cmd);
+
return 0;
}
{
struct ifreq ifr;
struct sockaddr_in *addr;
+ char cmd[128];
int sk, err;
if ((iface->flags & CONNMAN_IFACE_FLAG_RTNL) == 0)
return -1;
}
+ sprintf(cmd, "resolvconf -d %s", ifr.ifr_name);
+
+ DBG("%s", cmd);
+
+ system(cmd);
+
return 0;
}