From: bluhm Date: Tue, 6 Feb 2024 00:18:53 +0000 (+0000) Subject: Invert broken check of panic string in if_linkstate(). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d618cc99d763265495b18c5530371ae48d1f51c4;p=openbsd Invert broken check of panic string in if_linkstate(). original bug report from syzkaller Reported-by: syzbot+d19060a65721eb432a72@syzkaller.appspotmail.com broken fix found by Hrvoje Popovski hint to the problem and OK deraadt@ --- diff --git a/sys/net/if.c b/sys/net/if.c index 6677cf0251a..9b971251ec1 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.717 2024/02/05 18:27:47 mvs Exp $ */ +/* $OpenBSD: if.c,v 1.718 2024/02/06 00:18:53 bluhm Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -1788,7 +1788,7 @@ if_linkstate(struct ifnet *ifp) { NET_ASSERT_LOCKED(); - if (panicstr != NULL) { + if (panicstr == NULL) { rtm_ifchg(ifp); rt_if_track(ifp); }