Count packets as not being delivered only if they are neither

processed by a kernel handler nor by a raw socket.

MFC after:	1 week
This commit is contained in:
tuexen 2016-05-25 13:48:26 +00:00
parent 10f1209022
commit 34285663b0

View File

@ -132,6 +132,8 @@ int (*ip_rsvp_vif)(struct socket *, struct sockopt *);
void (*ip_rsvp_force_done)(struct socket *);
#endif /* INET */
extern struct protosw inetsw[];
u_long rip_sendspace = 9216;
SYSCTL_ULONG(_net_inet_raw, OID_AUTO, maxdgram, CTLFLAG_RW,
&rip_sendspace, 0, "Maximum outgoing raw IP datagram size");
@ -411,9 +413,11 @@ rip_input(struct mbuf **mp, int *offp, int proto)
IPSTAT_INC(ips_delivered);
INP_RUNLOCK(last);
} else {
if (inetsw[ip_protox[ip->ip_p]].pr_input == rip_input) {
IPSTAT_INC(ips_noproto);
IPSTAT_DEC(ips_delivered);
}
m_freem(m);
IPSTAT_INC(ips_noproto);
IPSTAT_DEC(ips_delivered);
}
return (IPPROTO_DONE);
}