summaryrefslogtreecommitdiff
path: root/networking/arp.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/arp.c')
-rw-r--r--networking/arp.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/networking/arp.c b/networking/arp.c
index 6a7c862b8..e529257a8 100644
--- a/networking/arp.c
+++ b/networking/arp.c
@@ -188,9 +188,8 @@ static void arp_getdevhw(char *ifname, struct sockaddr *sa,
188 const struct hwtype *xhw; 188 const struct hwtype *xhw;
189 189
190 strcpy(ifr.ifr_name, ifname); 190 strcpy(ifr.ifr_name, ifname);
191 if (ioctl(sockfd, SIOCGIFHWADDR, &ifr) < 0) { 191 ioctl_or_perror_and_die(sockfd, SIOCGIFHWADDR, &ifr,
192 bb_perror_msg_and_die("cant get HW-Address for '%s'", ifname); 192 "cant get HW-Address for '%s'", ifname);
193 }
194 if (hwt && (ifr.ifr_hwaddr.sa_family != hw->type)) { 193 if (hwt && (ifr.ifr_hwaddr.sa_family != hw->type)) {
195 bb_error_msg_and_die("protocol type mismatch"); 194 bb_error_msg_and_die("protocol type mismatch");
196 } 195 }
@@ -306,9 +305,7 @@ static int arp_set(char **args)
306 /* Call the kernel. */ 305 /* Call the kernel. */
307 if (option_mask32 & ARP_OPT_v) 306 if (option_mask32 & ARP_OPT_v)
308 bb_error_msg("SIOCSARP()"); 307 bb_error_msg("SIOCSARP()");
309 if (ioctl(sockfd, SIOCSARP, &req) < 0) { 308 xioctl(sockfd, SIOCSARP, &req);
310 bb_perror_msg_and_die("SIOCSARP");
311 }
312 return 0; 309 return 0;
313} 310}
314 311