the rt parameter to ifa_rtrequest callbacks should always be non-null;
eliminate grauitous ptr checks that follow ptr deref's Noticed by: Coverity Prevent analysis tool
This commit is contained in:
parent
087f49016f
commit
89bc9a3171
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142352
@ -202,9 +202,7 @@ static void
|
||||
discrtrequest(int cmd, struct rtentry *rt, struct rt_addrinfo *info)
|
||||
{
|
||||
RT_LOCK_ASSERT(rt);
|
||||
|
||||
if (rt)
|
||||
rt->rt_rmx.rmx_mtu = DSMTU;
|
||||
rt->rt_rmx.rmx_mtu = DSMTU;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -275,8 +275,7 @@ faithrtrequest(cmd, rt, info)
|
||||
struct rt_addrinfo *info;
|
||||
{
|
||||
RT_LOCK_ASSERT(rt);
|
||||
if (rt)
|
||||
rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu;
|
||||
rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -323,8 +323,7 @@ lortrequest(cmd, rt, info)
|
||||
struct rt_addrinfo *info;
|
||||
{
|
||||
RT_LOCK_ASSERT(rt);
|
||||
if (rt)
|
||||
rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu;
|
||||
rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -766,9 +766,7 @@ stf_rtrequest(cmd, rt, info)
|
||||
struct rt_addrinfo *info;
|
||||
{
|
||||
RT_LOCK_ASSERT(rt);
|
||||
|
||||
if (rt)
|
||||
rt->rt_rmx.rmx_mtu = IPV6_MMTU;
|
||||
rt->rt_rmx.rmx_mtu = IPV6_MMTU;
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user