summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-08-24 14:53:41 +0000
committerbrian <brian@FreeBSD.org>2001-08-24 14:53:41 +0000
commit5053d4fa277dcc006a6585503be3d7d201b7ef6d (patch)
treef42d1888e7834f613f388d588f0b6e8042b89a60 /usr.sbin
parentd5f1613eb6c809d941a411c2d91e336a3b2eacf9 (diff)
downloadFreeBSD-src-5053d4fa277dcc006a6585503be3d7d201b7ef6d.zip
FreeBSD-src-5053d4fa277dcc006a6585503be3d7d201b7ef6d.tar.gz
Handle return values of 0 from NgRecvMsg() properly.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/ether.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ppp/ether.c b/usr.sbin/ppp/ether.c
index 7052000..be261da 100644
--- a/usr.sbin/ppp/ether.c
+++ b/usr.sbin/ppp/ether.c
@@ -230,7 +230,7 @@ ether_MessageIn(struct etherdevice *dev)
if (ret <= 0)
return;
- if (NgRecvMsg(dev->cs, rep, sizeof msgbuf, NULL) < 0)
+ if (NgRecvMsg(dev->cs, rep, sizeof msgbuf, NULL) <= 0)
return;
if (rep->header.version != NG_VERSION) {
@@ -511,7 +511,7 @@ ether_Create(struct physical *p)
/* Get our list back */
resp = (struct ng_mesg *)rbuf;
- if (NgRecvMsg(dev->cs, resp, sizeof rbuf, NULL) < 0) {
+ if (NgRecvMsg(dev->cs, resp, sizeof rbuf, NULL) <= 0) {
log_Printf(LogWARN, "Cannot get netgraph response: %s\n",
strerror(errno));
return ether_Abandon(dev, p);
OpenPOWER on IntegriCloud