Date: Sat, 14 May 2016 23:32:03 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299784 - head/sbin/routed Message-ID: <201605142332.u4ENW3qs087044@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Sat May 14 23:32:03 2016 New Revision: 299784 URL: https://svnweb.freebsd.org/changeset/base/299784 Log: Avoid NULL de-references. CID: 271079 Obtained from: NetBSD MFC after: 2 weeks. Modified: head/sbin/routed/output.c Modified: head/sbin/routed/output.c ============================================================================== --- head/sbin/routed/output.c Sat May 14 23:29:41 2016 (r299783) +++ head/sbin/routed/output.c Sat May 14 23:32:03 2016 (r299784) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605142332.u4ENW3qs087044>