From 804c67a4867afb8b7ef41a3ade748cab870b788c Mon Sep 17 00:00:00 2001 From: kevlo Date: Fri, 21 Dec 2012 15:54:13 +0000 Subject: Fix socket calls on error post-r243965. Submitted by: Garrett Cooper --- lib/libnetgraph/sock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libnetgraph/sock.c') diff --git a/lib/libnetgraph/sock.c b/lib/libnetgraph/sock.c index fca3900..5f9f563 100644 --- a/lib/libnetgraph/sock.c +++ b/lib/libnetgraph/sock.c @@ -71,10 +71,10 @@ NgMkSockNode(const char *name, int *csp, int *dsp) name = NULL; /* Create control socket; this also creates the netgraph node. - If we get an EPROTONOSUPPORT then the socket node type is + If we get an EAFNOSUPPORT then the socket node type is not loaded, so load it and try again. */ if ((cs = socket(AF_NETGRAPH, SOCK_DGRAM, NG_CONTROL)) < 0) { - if (errno == EPROTONOSUPPORT) { + if (errno == EAFNOSUPPORT) { if (kldload(NG_SOCKET_KLD) < 0) { errnosv = errno; if (_gNgDebugLevel >= 1) -- cgit v1.1