ip_input: remove pointless check in INP_RECVIF handling

An mbuf rcvif pointer is supposed to be valid and doesn't
need extra checks.  The code appeared in d314ad7b73.
This commit is contained in:
Gleb Smirnoff 2021-12-02 11:15:04 -08:00
parent bfb7a31b6a
commit 3cce6164ab

View File

@ -1281,8 +1281,7 @@ ip_savecontrol(struct inpcb *inp, struct mbuf **mp, struct ip *ip,
struct sockaddr_dl *sdp;
struct sockaddr_dl *sdl2 = &sdlbuf.sdl;
if ((ifp = m->m_pkthdr.rcvif) &&
ifp->if_index && ifp->if_index <= V_if_index) {
if ((ifp = m->m_pkthdr.rcvif)) {
sdp = (struct sockaddr_dl *)ifp->if_addr->ifa_addr;
/*
* Change our mind and don't try copy.