summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2006-09-20 20:48:27 +0000
committerDavid Cantrell <dcantrell@redhat.com>2006-09-20 20:48:27 +0000
commit6b19416dcb18c2093036f321a5fb38571c6ebe75 (patch)
tree51c3b16a3239003872bdda74ecf1925dea184482 /isys
parenta19359783313dc5db8cc3cd4ae99a32d9a497797 (diff)
downloadanaconda-6b19416dcb18c2093036f321a5fb38571c6ebe75.tar.gz
anaconda-6b19416dcb18c2093036f321a5fb38571c6ebe75.tar.xz
anaconda-6b19416dcb18c2093036f321a5fb38571c6ebe75.zip
* isys/isys.c (doDhcpNetDevice): Call pumpSetupInterface() after
we call pumpDhcpClassRun() to bring the interface up. NOTE: This function only does IPv4 stuff right now since the UI code needs changes before IPv6 can be worked in (#206192, #200109).
Diffstat (limited to 'isys')
-rw-r--r--isys/isys.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/isys/isys.c b/isys/isys.c
index 04cbd9fb4..23cb85342 100644
--- a/isys/isys.c
+++ b/isys/isys.c
@@ -617,6 +617,7 @@ static PyObject * doDhcpNetDevice(PyObject * s, PyObject * args) {
char buf[47];
time_t timeout = 45;
struct pumpNetIntf cfg;
+ /* FIXME: we call this from rescue mode, need to pass in what user wants */
DHCP_Preference pref = DHCPv6_DISABLE;
ip_addr_t *tip;
PyObject * rc;
@@ -624,7 +625,7 @@ static PyObject * doDhcpNetDevice(PyObject * s, PyObject * args) {
if (!PyArg_ParseTuple(args, "s|s", &device, &dhcpclass))
return NULL;
- memset(&cfg,'\0',sizeof(struct pumpNetIntf));
+ memset(&cfg, '\0', sizeof(cfg));
strncpy(cfg.device, device, sizeof(cfg.device) - 1);
r = pumpDhcpClassRun(&cfg, 0L, "anaconda", pref, 0, timeout, NULL, 0L);
@@ -633,6 +634,12 @@ static PyObject * doDhcpNetDevice(PyObject * s, PyObject * args) {
return Py_None;
}
+ r = pumpSetupInterface(&cfg);
+ if (r) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+
if (cfg.numDns) {
tip = &(cfg.dnsServers[0]);
inet_ntop(tip->sa_family, IP_ADDR(tip), buf, IP_STRLEN(tip));