aboutsummaryrefslogtreecommitdiff
path: root/networking/route.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/route.c')
-rw-r--r--networking/route.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/networking/route.c b/networking/route.c
index 8ae0da182..e7e8f1c02 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -1,3 +1,4 @@
1/* vi: set sw=4 ts=4: */
1/* route 2/* route
2 * 3 *
3 * Similar to the standard Unix route, but with only the necessary 4 * Similar to the standard Unix route, but with only the necessary
@@ -9,11 +10,7 @@
9 * Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> 10 * Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
10 * (derived from FvK's 'route.c 1.70 01/04/94') 11 * (derived from FvK's 'route.c 1.70 01/04/94')
11 * 12 *
12 * This program is free software; you can redistribute it 13 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
13 * and/or modify it under the terms of the GNU General
14 * Public License as published by the Free Software
15 * Foundation; either version 2 of the License, or (at
16 * your option) any later version.
17 * 14 *
18 * $Id: route.c,v 1.26 2004/03/19 23:27:08 mjn3 Exp $ 15 * $Id: route.c,v 1.26 2004/03/19 23:27:08 mjn3 Exp $
19 * 16 *
@@ -338,9 +335,7 @@ static void INET_setroute(int action, char **args)
338 } 335 }
339 336
340 /* Create a socket to the INET kernel. */ 337 /* Create a socket to the INET kernel. */
341 if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { 338 skfd = bb_xsocket(AF_INET, SOCK_DGRAM, 0);
342 bb_perror_msg_and_die("socket");
343 }
344 339
345 if (ioctl(skfd, ((action==RTACTION_ADD) ? SIOCADDRT : SIOCDELRT), &rt)<0) { 340 if (ioctl(skfd, ((action==RTACTION_ADD) ? SIOCADDRT : SIOCDELRT), &rt)<0) {
346 bb_perror_msg_and_die("SIOC[ADD|DEL]RT"); 341 bb_perror_msg_and_die("SIOC[ADD|DEL]RT");
@@ -434,9 +429,7 @@ static void INET6_setroute(int action, char **args)
434 } 429 }
435 430
436 /* Create a socket to the INET6 kernel. */ 431 /* Create a socket to the INET6 kernel. */
437 if ((skfd = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) { 432 skfd = bb_xsocket(AF_INET6, SOCK_DGRAM, 0);
438 bb_perror_msg_and_die("socket");
439 }
440 433
441 rt.rtmsg_ifindex = 0; 434 rt.rtmsg_ifindex = 0;
442 435