diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2002-06-16 17:00:40 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2002-06-16 17:00:40 +0000 |
commit | f582c1f06311de03aedb859a10950e707816fed9 (patch) | |
tree | 6f6ecba5fb9daa5ee8f43f68c9eaea0b9da632ad | |
parent | 9e8563ebc33bbae323eead47a41b9d6333fca065 (diff) |
Missing braces around else case, fixes a kernel crash introduced in r1.5 if
a non-existent interface is passed to "pfctl -l". Reported by
grange@disorder.ru.
-rw-r--r-- | sys/net/pf_ioctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c index 68fc6cac57f..75b3362a130 100644 --- a/sys/net/pf_ioctl.c +++ b/sys/net/pf_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_ioctl.c,v 1.5 2002/06/11 01:58:00 henning Exp $ */ +/* $OpenBSD: pf_ioctl.c,v 1.6 2002/06/16 17:00:39 aaron Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1322,9 +1322,10 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) if ((ifp = ifunit(pi->ifname)) == NULL) error = EINVAL; - else + else { status_ifp = ifp; strlcpy(pf_status.ifname, ifp->if_xname, IFNAMSIZ); + } break; } |