diff options
author | Kevin Steves <stevesk@cvs.openbsd.org> | 2007-02-13 15:22:00 +0000 |
---|---|---|
committer | Kevin Steves <stevesk@cvs.openbsd.org> | 2007-02-13 15:22:00 +0000 |
commit | ba5404b04a7998141d8413802f2ab7e781498829 (patch) | |
tree | b1ff1b264424430b694ad7639bf588d9d0e7f214 | |
parent | ad94ca0b94f9178bdaf6f64e422778cb7463591a (diff) |
error check socket() return; ok henning@
-rw-r--r-- | sbin/dhclient/dhclient.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 681872be910..ce84a1cff97 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.107 2007/01/29 13:12:56 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.108 2007/02/13 15:21:59 stevesk Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -357,7 +357,8 @@ main(int argc, char *argv[]) priv_script_write_params("alias_", client->alias); priv_script_go(); - routefd = socket(PF_ROUTE, SOCK_RAW, 0); + if ((routefd = socket(PF_ROUTE, SOCK_RAW, 0)) == -1) + error("socket(PF_ROUTE, SOCK_RAW): %m"); /* set up the interface */ discover_interface(); |