summaryrefslogtreecommitdiffstats
path: root/isys/isys.c
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2000-02-17 21:21:20 +0000
committerErik Troan <ewt@redhat.com>2000-02-17 21:21:20 +0000
commit7997696eb9dce87a92e8501359201ab76544ec0b (patch)
tree2b03283003780041737df1c57d61e9a3e4c69920 /isys/isys.c
parentf8ac3e20227fb237a2a7d996ba5d6330757ba739 (diff)
downloadanaconda-7997696eb9dce87a92e8501359201ab76544ec0b.tar.gz
anaconda-7997696eb9dce87a92e8501359201ab76544ec0b.tar.xz
anaconda-7997696eb9dce87a92e8501359201ab76544ec0b.zip
ignore empty domains
Diffstat (limited to 'isys/isys.c')
-rw-r--r--isys/isys.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/isys/isys.c b/isys/isys.c
index b427c6247..6386e7f0e 100644
--- a/isys/isys.c
+++ b/isys/isys.c
@@ -738,7 +738,6 @@ static PyObject * doConfigNetDevice(PyObject * s, PyObject * args) {
strncpy(device.device, dev, sizeof(device.device) - 1);
device.ip.s_addr = inet_addr(ip);
device.netmask.s_addr = inet_addr(netmask);
- device.gateway.s_addr = inet_addr(gateway);
*((int32 *) &device.broadcast) = (*((int32 *) &device.ip) &
*((int32 *) &device.netmask)) |
@@ -755,9 +754,12 @@ static PyObject * doConfigNetDevice(PyObject * s, PyObject * args) {
return NULL;
}
- if (pumpSetupDefaultGateway(&device.gateway)) {
- PyErr_SetFromErrno(PyExc_SystemError);
- return NULL;
+ if (strlen(gateway)) {
+ device.gateway.s_addr = inet_addr(gateway);
+ if (pumpSetupDefaultGateway(&device.gateway)) {
+ PyErr_SetFromErrno(PyExc_SystemError);
+ return NULL;
+ }
}
Py_INCREF(Py_None);