From 7c415819be9ed42eef8d9117396af978fd2533b6 Mon Sep 17 00:00:00 2001 From: Maxim Konovalov Date: Fri, 28 Apr 2017 09:17:16 +0000 Subject: [PATCH] o Clean the whole array of IPv4 addresses not just a local part. PR: 218923 Submitted by: Daniel McRobb --- usr.sbin/tcpdrop/tcpdrop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/tcpdrop/tcpdrop.c b/usr.sbin/tcpdrop/tcpdrop.c index 03667e4d810..721129f6898 100644 --- a/usr.sbin/tcpdrop/tcpdrop.c +++ b/usr.sbin/tcpdrop/tcpdrop.c @@ -321,7 +321,7 @@ tcpdropconn(const struct in_conninfo *inc) sizeof inc->inc6_faddr); foreign = (struct sockaddr *)&sin6[TCPDROP_FOREIGN]; } else { - memset(&sin4[TCPDROP_LOCAL], 0, sizeof sin4[TCPDROP_LOCAL]); + memset(sin4, 0, sizeof sin4); sin4[TCPDROP_LOCAL].sin_len = sizeof sin4[TCPDROP_LOCAL]; sin4[TCPDROP_LOCAL].sin_family = AF_INET;