mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Avoid NULL de-references.
CID: 271079 Obtained from: NetBSD MFC after: 2 weeks.
This commit is contained in:
parent
4a2b63d5bb
commit
5728318b35
1 changed files with 2 additions and 2 deletions
|
|
@ -711,7 +711,7 @@ supply(struct sockaddr_in *dst,
|
|||
|
||||
switch (type) {
|
||||
case OUT_MULTICAST:
|
||||
if (ifp->int_if_flags & IFF_MULTICAST)
|
||||
if (ifp != NULL && ifp->int_if_flags & IFF_MULTICAST)
|
||||
v2buf.type = OUT_MULTICAST;
|
||||
else
|
||||
v2buf.type = NO_OUT_MULTICAST;
|
||||
|
|
@ -757,7 +757,7 @@ supply(struct sockaddr_in *dst,
|
|||
/* Fake a default route if asked and if there is not already
|
||||
* a better, real default route.
|
||||
*/
|
||||
if (supplier && (def_metric = ifp->int_d_metric) != 0) {
|
||||
if (supplier && ifp && (def_metric = ifp->int_d_metric) != 0) {
|
||||
if ((rt = rtget(RIP_DEFAULT, 0)) == NULL
|
||||
|| rt->rt_metric+ws.metric >= def_metric) {
|
||||
ws.state |= WS_ST_DEFAULT;
|
||||
|
|
|
|||
Loading…
Reference in a new issue