From c441a0db5825f944e95bd30930a7acfce4287f85 Mon Sep 17 00:00:00 2001 From: brian Date: Fri, 24 Aug 2001 14:53:41 +0000 Subject: [PATCH] Handle return values of 0 from NgRecvMsg() properly. --- usr.sbin/ppp/ether.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ppp/ether.c b/usr.sbin/ppp/ether.c index 7052000d80f6..be261da06dba 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);