diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-10-22 10:31:03 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-10-22 10:31:03 +0000 |
commit | 7faad4293e4f0647cc8b240264d3712285fbbd25 (patch) | |
tree | 181d8d6905325f3fae6141b7ac33cfef827a69f2 /sys/netinet/ip_icmp.c | |
parent | 009b5f25850607164ada64a9f86530d9a20d95ef (diff) |
Do not dereference ``ia_ifp'' when we already have an ``ifp'' pointer.
Diffstat (limited to 'sys/netinet/ip_icmp.c')
-rw-r--r-- | sys/netinet/ip_icmp.c | 6 |
1 files 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: |