summaryrefslogtreecommitdiff
path: root/drivers/s390/net/qeth_l3_sys.c
diff options
context:
space:
mode:
authorStefan Raspl <raspl@linux.vnet.ibm.com>2013-03-19 00:04:43 +0400
committerDavid S. Miller <davem@davemloft.net>2013-03-19 18:09:40 +0400
commit82e2e782a3e486e3bfcc6130f0ebc28453af9955 (patch)
treebd104698d7d15746e0d148938f418f6d53d836e3 /drivers/s390/net/qeth_l3_sys.c
parent82f77cf9704cd06c452019421e5aada3a0648c76 (diff)
downloadlinux-82e2e782a3e486e3bfcc6130f0ebc28453af9955.tar.xz
qeth: Fix invalid router settings handling
Give a bad return code when specifying a router setting that is either invalid or not support on the respective device type. In addition, fall back the previous setting instead of silently switching back to 'no routing'. Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com> Signed-off-by: Frank Blaschka <blaschka@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_l3_sys.c')
-rw-r--r--drivers/s390/net/qeth_l3_sys.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/s390/net/qeth_l3_sys.c b/drivers/s390/net/qeth_l3_sys.c
index ebc379486267..e70af2406ff9 100644
--- a/drivers/s390/net/qeth_l3_sys.c
+++ b/drivers/s390/net/qeth_l3_sys.c
@@ -87,6 +87,8 @@ static ssize_t qeth_l3_dev_route_store(struct qeth_card *card,
rc = qeth_l3_setrouting_v6(card);
}
out:
+ if (rc)
+ route->type = old_route_type;
mutex_unlock(&card->conf_mutex);
return rc ? rc : count;
}