aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/mp.c
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>1998-05-06 18:50:12 +0000
committerBrian Somers <brian@FreeBSD.org>1998-05-06 18:50:12 +0000
commit1bc9b5ba8459c0f2350adc754669890bc2f8bf6e (patch)
treeaafad5b993a086c739f51e4709ba15d689476a31 /usr.sbin/ppp/mp.c
parent078c562e54a89d5635033ce35b85a84b70a599b0 (diff)
downloadsrc-1bc9b5ba8459c0f2350adc754669890bc2f8bf6e.tar.gz
src-1bc9b5ba8459c0f2350adc754669890bc2f8bf6e.zip
o Make sure we don't dereference NULL when we've lost all our links.
o Use srandomdev() for __FreeBSD__ >= 2, not just >2. o Use srandom((time(NULL)^getpid())+random()), random() when we haven't got srandomdev().
Notes
Notes: svn path=/cvs2svn/branches/MP/; revision=35791
Diffstat (limited to 'usr.sbin/ppp/mp.c')
-rw-r--r--usr.sbin/ppp/mp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/ppp/mp.c b/usr.sbin/ppp/mp.c
index 4d489cf79c7e..234380674575 100644
--- a/usr.sbin/ppp/mp.c
+++ b/usr.sbin/ppp/mp.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp.c,v 1.1.2.22 1998/05/04 03:00:08 brian Exp $
+ * $Id: mp.c,v 1.1.2.23 1998/05/04 21:42:41 brian Exp $
*/
#include <sys/types.h>
@@ -542,6 +542,8 @@ mp_FillQueues(struct bundle *bundle)
if (!fdl) {
fdl = bundle->links;
+ if (!fdl)
+ return 0;
thislink = 0;
}
@@ -859,7 +861,7 @@ mpserver_Read(struct descriptor *d, struct bundle *bundle, const fd_set *fdset)
return;
}
- if (in.sa_family == AF_LOCAL) /* ??? */
+ if (in.sa_family == AF_LOCAL)
bundle_ReceiveDatalink(bundle, fd, (struct sockaddr_un *)&in);
close(fd);