diff options
author | Can Erkin Acar <canacar@cvs.openbsd.org> | 2005-06-07 05:10:58 +0000 |
---|---|---|
committer | Can Erkin Acar <canacar@cvs.openbsd.org> | 2005-06-07 05:10:58 +0000 |
commit | 5f0acf6733ad1ae34d35f4ab7a099498aa3d635d (patch) | |
tree | 6d1ab29dcec88be912e6f6ba265721b444b32f59 | |
parent | 47735497b28a35d13e0e55e67830b4bd0af9674d (diff) |
fix a possible panic in error path,
do not try to check debug status of a
non existing interface in server mode.
-rw-r--r-- | sys/net/if_pppoe.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/net/if_pppoe.c b/sys/net/if_pppoe.c index d7db42c70b7..c44c7653fa0 100644 --- a/sys/net/if_pppoe.c +++ b/sys/net/if_pppoe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pppoe.c,v 1.3 2005/01/01 00:30:31 canacar Exp $ */ +/* $OpenBSD: if_pppoe.c,v 1.4 2005/06/07 05:10:57 canacar Exp $ */ /* $NetBSD: if_pppoe.c,v 1.51 2003/11/28 08:56:48 keihan Exp $ */ /* @@ -528,8 +528,7 @@ static void pppoe_dispatch_disc_pkt(struct mbuf *m, int off) printf("%s: %s: %*s\n", sc ? sc->sc_sppp.pp_if.if_xname : "pppoe*", err_msg, len, err_txt); - if (errortag) - goto done; + goto done; } off += sizeof(*pt) + len; } @@ -553,7 +552,9 @@ breakbreak: break; } if (sc == NULL) { - PPPOEDEBUG(("pppoe: free passive interface is not found\n")); +#ifdef PPPOE_DEBUG + printf("pppoe: free passive interface is not found\n"); +#endif goto done; } if (hunique) { |