From: claudio Date: Mon, 7 Feb 2022 11:03:34 +0000 (+0000) Subject: In rtredirect() change an bad assignment in an if condition to the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b0aee4e7ef7d5238ddf97287b1f2153e5f857daa;p=openbsd In rtredirect() change an bad assignment in an if condition to the correct equality check. Found by and OK jsg@ --- diff --git a/sys/net/route.c b/sys/net/route.c index 641469b34f1..44a0e758058 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.400 2022/01/02 22:36:04 jsg Exp $ */ +/* $OpenBSD: route.c,v 1.401 2022/02/07 11:03:34 claudio Exp $ */ /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */ /* @@ -584,7 +584,7 @@ rtredirect(struct sockaddr *dst, struct sockaddr *gateway, if (rt != NULL && (!equal(src, rt->rt_gateway) || rt->rt_ifa != ifa)) error = EINVAL; else if (ifa_ifwithaddr(gateway, rdomain) != NULL || - (gateway->sa_family = AF_INET && + (gateway->sa_family == AF_INET && in_broadcast(satosin(gateway)->sin_addr, rdomain))) error = EHOSTUNREACH; if (error)