aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce M Simpson <bms@FreeBSD.org>2004-10-26 17:28:36 +0000
committerBruce M Simpson <bms@FreeBSD.org>2004-10-26 17:28:36 +0000
commitae78dbb3d23f8d7794b14dc4324fb1600dc08273 (patch)
tree3220191063308a8253c8473f40a20cdf020af300
parentc19ac7f749175aee1f7fd0f68dc90ebefd485f4b (diff)
downloadsrc-ae78dbb3d23f8d7794b14dc4324fb1600dc08273.tar.gz
src-ae78dbb3d23f8d7794b14dc4324fb1600dc08273.zip
MFC r1.131:
Check that rt_mask(rt) is non-NULL before dereferencing it, in the RTM_ADD case, thus avoiding a panic. PR: kern/42030 Submitted by: Iasen Kostov Approved by: re@
Notes
Notes: svn path=/releng/5.3/; revision=136973
-rw-r--r--sys/netinet/if_ether.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index bcd44d0257d1..1ea80cd54e6e 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -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) {