ip_reass.c (265942) | ip_reass.c (269699) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1988, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)ip_input.c 8.2 (Berkeley) 1/4/94 30 */ 31 32#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986, 1988, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)ip_input.c 8.2 (Berkeley) 1/4/94 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/netinet/ip_input.c 265942 2014-05-13 05:07:03Z yongari $"); | 33__FBSDID("$FreeBSD: head/sys/netinet/ip_input.c 269699 2014-08-08 01:57:15Z kevlo $"); |
34 35#include "opt_bootp.h" 36#include "opt_ipfw.h" 37#include "opt_ipstealth.h" 38#include "opt_ipsec.h" 39#include "opt_route.h" 40 41#include <sys/param.h> --- 679 unchanged lines hidden (view full) --- 721 goto bad; 722#endif /* IPSEC */ 723 724 /* 725 * Switch out to protocol's input routine. 726 */ 727 IPSTAT_INC(ips_delivered); 728 | 34 35#include "opt_bootp.h" 36#include "opt_ipfw.h" 37#include "opt_ipstealth.h" 38#include "opt_ipsec.h" 39#include "opt_route.h" 40 41#include <sys/param.h> --- 679 unchanged lines hidden (view full) --- 721 goto bad; 722#endif /* IPSEC */ 723 724 /* 725 * Switch out to protocol's input routine. 726 */ 727 IPSTAT_INC(ips_delivered); 728 |
729 (*inetsw[ip_protox[ip->ip_p]].pr_input)(m, hlen); | 729 (*inetsw[ip_protox[ip->ip_p]].pr_input)(&m, &hlen, ip->ip_p); |
730 return; 731bad: 732 m_freem(m); 733} 734 735/* 736 * After maxnipq has been updated, propagate the change to UMA. The UMA zone 737 * max has slightly different semantics than the sysctl, for historical --- 972 unchanged lines hidden (view full) --- 1710 */ 1711 if (V_ip_rsvp_on) { 1712 V_ip_rsvp_on = 0; 1713 V_rsvp_on--; 1714 } 1715 return 0; 1716} 1717 | 730 return; 731bad: 732 m_freem(m); 733} 734 735/* 736 * After maxnipq has been updated, propagate the change to UMA. The UMA zone 737 * max has slightly different semantics than the sysctl, for historical --- 972 unchanged lines hidden (view full) --- 1710 */ 1711 if (V_ip_rsvp_on) { 1712 V_ip_rsvp_on = 0; 1713 V_rsvp_on--; 1714 } 1715 return 0; 1716} 1717 |
1718void 1719rsvp_input(struct mbuf *m, int off) /* XXX must fixup manually */ | 1718int 1719rsvp_input(struct mbuf **mp, int *offp, int proto) |
1720{ | 1720{ |
1721 struct mbuf *m; |
|
1721 | 1722 |
1723 m = *mp; 1724 *mp = NULL; 1725 |
|
1722 if (rsvp_input_p) { /* call the real one if loaded */ | 1726 if (rsvp_input_p) { /* call the real one if loaded */ |
1723 rsvp_input_p(m, off); 1724 return; | 1727 *mp = m; 1728 rsvp_input_p(mp, offp, proto); 1729 return (IPPROTO_DONE); |
1725 } 1726 1727 /* Can still get packets with rsvp_on = 0 if there is a local member 1728 * of the group to which the RSVP packet is addressed. But in this 1729 * case we want to throw the packet away. 1730 */ 1731 1732 if (!V_rsvp_on) { 1733 m_freem(m); | 1730 } 1731 1732 /* Can still get packets with rsvp_on = 0 if there is a local member 1733 * of the group to which the RSVP packet is addressed. But in this 1734 * case we want to throw the packet away. 1735 */ 1736 1737 if (!V_rsvp_on) { 1738 m_freem(m); |
1734 return; | 1739 return (IPPROTO_DONE); |
1735 } 1736 1737 if (V_ip_rsvpd != NULL) { | 1740 } 1741 1742 if (V_ip_rsvpd != NULL) { |
1738 rip_input(m, off); 1739 return; | 1743 *mp = m; 1744 rip_input(mp, offp, proto); 1745 return (IPPROTO_DONE); |
1740 } 1741 /* Drop the packet */ 1742 m_freem(m); | 1746 } 1747 /* Drop the packet */ 1748 m_freem(m); |
1749 return (IPPROTO_DONE); |
|
1743} | 1750} |