aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/ip_input.c
diff options
context:
space:
mode:
authorKevin Lo <kevlo@FreeBSD.org>2014-08-08 01:57:15 +0000
committerKevin Lo <kevlo@FreeBSD.org>2014-08-08 01:57:15 +0000
commit8f5a8818f57e31278b4bbd415c2cfa498306f91f (patch)
treeb8a22569ba8e281cdf06effd47986cf8fb592118 /sys/netinet/ip_input.c
parent9ce4512ccdfba4d81df33f159791681418c82b0a (diff)
downloadsrc-8f5a8818f57e31278b4bbd415c2cfa498306f91f.tar.gz
src-8f5a8818f57e31278b4bbd415c2cfa498306f91f.zip
Merge 'struct ip6protosw' and 'struct protosw' into one. Now we have
only one protocol switch structure that is shared between ipv4 and ipv6. Phabric: D476 Reviewed by: jhb
Notes
Notes: svn path=/head/; revision=269699
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r--sys/netinet/ip_input.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 3a24296f9338..d622e011ead0 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -726,7 +726,7 @@ ours:
*/
IPSTAT_INC(ips_delivered);
- (*inetsw[ip_protox[ip->ip_p]].pr_input)(m, hlen);
+ (*inetsw[ip_protox[ip->ip_p]].pr_input)(&m, &hlen, ip->ip_p);
return;
bad:
m_freem(m);
@@ -1715,13 +1715,18 @@ ip_rsvp_done(void)
return 0;
}
-void
-rsvp_input(struct mbuf *m, int off) /* XXX must fixup manually */
+int
+rsvp_input(struct mbuf **mp, int *offp, int proto)
{
+ struct mbuf *m;
+
+ m = *mp;
+ *mp = NULL;
if (rsvp_input_p) { /* call the real one if loaded */
- rsvp_input_p(m, off);
- return;
+ *mp = m;
+ rsvp_input_p(mp, offp, proto);
+ return (IPPROTO_DONE);
}
/* Can still get packets with rsvp_on = 0 if there is a local member
@@ -1731,13 +1736,15 @@ rsvp_input(struct mbuf *m, int off) /* XXX must fixup manually */
if (!V_rsvp_on) {
m_freem(m);
- return;
+ return (IPPROTO_DONE);
}
if (V_ip_rsvpd != NULL) {
- rip_input(m, off);
- return;
+ *mp = m;
+ rip_input(mp, offp, proto);
+ return (IPPROTO_DONE);
}
/* Drop the packet */
m_freem(m);
+ return (IPPROTO_DONE);
}