From 70d066d3c67b2e1de75792dcfe662c372e390b45 Mon Sep 17 00:00:00 2001 From: mpi Date: Thu, 22 Oct 2015 10:31:02 +0000 Subject: [PATCH] Do not dereference ``ia_ifp'' when we already have an ``ifp'' pointer. --- sys/netinet/ip_icmp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 1212137cdbc..d14317d0db9 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_icmp.c,v 1.143 2015/10/19 12:10:05 mpi Exp $ */ +/* $OpenBSD: ip_icmp.c,v 1.144 2015/10/22 10:31:02 mpi Exp $ */ /* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */ /* @@ -570,13 +570,13 @@ icmp_input_if(struct ifnet *ifp, struct mbuf *m, int hlen) icp->icmp_type = ICMP_MASKREPLY; icp->icmp_mask = ia->ia_sockmask.sin_addr.s_addr; if (ip->ip_src.s_addr == 0) { - if (ia->ia_ifp->if_flags & IFF_BROADCAST) { + if (ifp->if_flags & IFF_BROADCAST) { if (ia->ia_broadaddr.sin_addr.s_addr) ip->ip_src = ia->ia_broadaddr.sin_addr; else ip->ip_src.s_addr = INADDR_BROADCAST; } - else if (ia->ia_ifp->if_flags & IFF_POINTOPOINT) + else if (ifp->if_flags & IFF_POINTOPOINT) ip->ip_src = ia->ia_dstaddr.sin_addr; } reflect: -- 2.20.1