diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-05-27 05:15:18 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-05-27 05:15:18 +0000 |
commit | 0d516d22fd1167eec740f8fbc8eae1bdc48bd0e8 (patch) | |
tree | 10de2572b3138192f89e0bf62526bb228e22865a /sbin | |
parent | 1d0575f33d6a8eaca8a784f32dad735fe90f2359 (diff) |
No need to shutdown(2) DGRAM socket before closing it. Found while looking
at the code with jdixon@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/pfctl/pfctl_altq.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sbin/pfctl/pfctl_altq.c b/sbin/pfctl/pfctl_altq.c index b4faaa04464..b2397fcd078 100644 --- a/sbin/pfctl/pfctl_altq.c +++ b/sbin/pfctl/pfctl_altq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_altq.c,v 1.91 2006/11/28 00:08:50 henning Exp $ */ +/* $OpenBSD: pfctl_altq.c,v 1.92 2007/05/27 05:15:17 claudio Exp $ */ /* * Copyright (c) 2002 @@ -1091,8 +1091,6 @@ 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"); if (close(s)) err(1, "close"); return ((u_int32_t)ifrdat.ifi_baudrate); @@ -1112,8 +1110,6 @@ getifmtu(char *ifname) errx(1, "getifmtu: strlcpy"); if (ioctl(s, SIOCGIFMTU, (caddr_t)&ifr) == -1) err(1, "SIOCGIFMTU"); - if (shutdown(s, SHUT_RDWR) == -1) - err(1, "shutdown"); if (close(s)) err(1, "close"); if (ifr.ifr_mtu > 0) |