Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/arp arp(8): one more to close socket.
details: https://anonhg.NetBSD.org/src/rev/fee4bbd49ead
branches: trunk
changeset: 449238:fee4bbd49ead
user: nonaka <nonaka%NetBSD.org@localhost>
date: Thu Feb 28 01:20:25 2019 +0000
description:
arp(8): one more to close socket.
diffstat:
usr.sbin/arp/arp.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 37d40def6a46 -r fee4bbd49ead usr.sbin/arp/arp.c
--- a/usr.sbin/arp/arp.c Thu Feb 28 01:11:04 2019 +0000
+++ b/usr.sbin/arp/arp.c Thu Feb 28 01:20:25 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arp.c,v 1.64 2019/02/27 23:29:50 dholland Exp $ */
+/* $NetBSD: arp.c,v 1.65 2019/02/28 01:20:25 nonaka Exp $ */
/*
* Copyright (c) 1984, 1993
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)arp.c 8.3 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: arp.c,v 1.64 2019/02/27 23:29:50 dholland Exp $");
+__RCSID("$NetBSD: arp.c,v 1.65 2019/02/28 01:20:25 nonaka Exp $");
#endif
#endif /* not lint */
@@ -413,8 +413,10 @@
sina = (struct sockaddr_inarp *)(void *)(rtm + 1);
sdl = (struct sockaddr_dl *)(void *)(RT_ROUNDUP(sina->sin_len) +
(char *)(void *)sina);
- if (sdl->sdl_family != AF_LINK)
+ if (sdl->sdl_family != AF_LINK) {
+ prog_close(s);
return (1);
+ }
rtm = rtmsg(s, RTM_DELETE, rtm, sina, sdl);
prog_close(s);
if (rtm == NULL)
Home |
Main Index |
Thread Index |
Old Index