Check that rt_mask(rt) is non-NULL before dereferencing it, in the

RTM_ADD case, thus avoiding a panic.

Submitted by:	Iasen Kostov
This commit is contained in:
Bruce M Simpson 2004-10-26 03:31:58 +00:00
parent b0258eb606
commit d6fa5d2806

View File

@ -178,6 +178,7 @@ arp_rtrequest(req, rt, info)
* restore cloning bit.
*/
if ((rt->rt_flags & RTF_HOST) == 0 &&
rt_mask(rt) != NULL &&
SIN(rt_mask(rt))->sin_addr.s_addr != 0xffffffff)
rt->rt_flags |= RTF_CLONING;
if (rt->rt_flags & RTF_CLONING) {