summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/pfctl/pfctl_altq.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/pfctl/pfctl_altq.c b/sbin/pfctl/pfctl_altq.c
index 8ade3f6dae4..0e08e2918d8 100644
--- a/sbin/pfctl/pfctl_altq.c
+++ b/sbin/pfctl/pfctl_altq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_altq.c,v 1.84 2004/04/26 02:50:04 kjc Exp $ */
+/* $OpenBSD: pfctl_altq.c,v 1.85 2004/05/20 12:18:52 henning Exp $ */
/*
* Copyright (c) 2002
@@ -1102,6 +1102,7 @@ getifspeed(char *ifname)
if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
err(1, "socket");
+ bzero(&ifr, sizeof(ifr));
if (strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)) >=
sizeof(ifr.ifr_name))
errx(1, "getifspeed: strlcpy");
@@ -1123,6 +1124,7 @@ getifmtu(char *ifname)
if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
err(1, "socket");
+ bzero(&ifr, sizeof(ifr));
if (strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)) >=
sizeof(ifr.ifr_name))
errx(1, "getifmtu: strlcpy");