diff options
author | kevlo <kevlo@FreeBSD.org> | 2012-12-21 15:54:13 +0000 |
---|---|---|
committer | kevlo <kevlo@FreeBSD.org> | 2012-12-21 15:54:13 +0000 |
commit | 804c67a4867afb8b7ef41a3ade748cab870b788c (patch) | |
tree | 978bc55596b12d6142055e42519088a4901b8bba /usr.sbin/mtest/mtest.c | |
parent | 6547dbdbaff0d10e29457c19876b28de348a0643 (diff) | |
download | FreeBSD-src-804c67a4867afb8b7ef41a3ade748cab870b788c.zip FreeBSD-src-804c67a4867afb8b7ef41a3ade748cab870b788c.tar.gz |
Fix socket calls on error post-r243965.
Submitted by: Garrett Cooper
Diffstat (limited to 'usr.sbin/mtest/mtest.c')
-rw-r--r-- | usr.sbin/mtest/mtest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/mtest/mtest.c b/usr.sbin/mtest/mtest.c index 60f7e09..a28fab7 100644 --- a/usr.sbin/mtest/mtest.c +++ b/usr.sbin/mtest/mtest.c @@ -204,12 +204,12 @@ main(int argc, char **argv) s6 = -1; #ifdef INET s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (s == -1 && errno != EPROTONOSUPPORT) + if (s == -1 && errno != EAFNOSUPPORT) err(1, "can't open IPv4 socket"); #endif #ifdef INET6 s6 = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP); - if (s6 == -1 && errno != EPROTONOSUPPORT) + if (s6 == -1 && errno != EAFNOSUPPORT) err(1, "can't open IPv6 socket"); #endif if (s == -1 && s6 == -1) |