From 289136ba460fcc860a0526ffff11e3ec1f0889c9 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sun, 11 May 2008 02:55:46 +0000 Subject: Check to make sure pp_tlf is not NULL in sppp_keepalive() before calling it. From NetBSD ok canacar@ --- sys/net/if_spppsubr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index a5d6870081e..f0c6a2bcaab 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_spppsubr.c,v 1.66 2008/05/11 02:28:16 canacar Exp $ */ +/* $OpenBSD: if_spppsubr.c,v 1.67 2008/05/11 02:55:45 brad Exp $ */ /* * Synchronous PPP/Cisco link level subroutines. * Keepalive protocol implemented in both Cisco and PPP modes. @@ -4549,7 +4549,8 @@ sppp_keepalive(void *dummy) /* Close connection immediately, completition of this * will summon the magic needed to reestablish it. */ - sp->pp_tlf(sp); + if (sp->pp_tlf) + sp->pp_tlf(sp); continue; } } -- cgit v1.2.3