summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2002-12-03 10:57:14 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2002-12-03 10:57:14 +0000
commit56fba1fcb87f06a2f946089f25e670c147514573 (patch)
tree964c3a1ee5287c4c2fc561bee1d93a5ed8fade12
parent5ea15c49320f8becc2c7ac8e96417217e773088f (diff)
be nice and shutdown the socket after beeing done; pointed out by kenjiro
-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 afa4b0bd7f1..db8674ebc7f 100644
--- a/sbin/pfctl/pfctl_altq.c
+++ b/sbin/pfctl/pfctl_altq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_altq.c,v 1.16 2002/12/02 22:18:21 henning Exp $ */
+/* $OpenBSD: pfctl_altq.c,v 1.17 2002/12/03 10:57:13 henning Exp $ */
/*
* Copyright (C) 2002
* Sony Computer Science Laboratories Inc. All rights reserved.
@@ -632,5 +632,7 @@ getifspeed(char *ifname)
ifr.ifr_data = (caddr_t)&ifrdat;
if (ioctl(s, SIOCGIFDATA, (caddr_t)&ifr) == -1)
err(1, "SIOCGIFDATA");
+ if (shutdown(s, SHUT_RDWR) == -1)
+ err(1, "shutdown");
return ((u_int32_t)ifrdat.ifi_baudrate);
}