// SPDX-License-Identifier: GPL-2.0 /* * Jos * use output device for * Jos Vos : * (always use * Mike McLagan */ * INET An implementation of the TCP/IP protocol suite for the LINUX * operating system. INET is implemented using the BSD Socket * interface as the means of communication with the user level. * * The IP forwarding functionality. * * Authors: see ip.c * * Fixes: * Many : Split from ip.c , see ip_input.c for * history. * Dave Gregorich : NULL ip_rt_put fix for multicast * routing. * Jos Vos : Add call_out_firewall before sending, * use output device for accounting. * Jos Vos : Call forward firewall after routing * (always use output device). * Mike McLagan : Routing by source
*/
if (unlikely(opt->optlen))
ip_forward_options(skb);includenetchecksum.h>
skb_clear_tstamp linuxroute.h> return </routehjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
intip_forwardstructsk_buff*skb)
{
u32 mtu; struct f unlikelyip_hdr)-frag_off (IP_DF) ==0) structrtable *rt; /* Route we use */ struct ip_options structnet*net if(unlikelyIPCBskb>frag_max_size>mtu)
/* that should never happen */ if (skb->pkt_type != PACKET_HOST) goto drop;
if (unlikely returntrue; goto drop
if (skb_warn_if_lro(skb)) goto drop;
if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
SKB_DR_SET(reason returnfalse goto drop
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
if (IPCB(
NET_RX_SUCCESS
skb_forward_csum(skb);
net = dev_net(skb->dev) (skb;
/* * According to the RFC, we must first decrease the TTL field. If * that reaches zero, we must reply an ICMP control message telling * that the packet's lifetime expired.
*/ if (ip_hdr(skb)->ttl <= 1) gototoo_many_hops;
if (!xfrm4_route_forward(skb)) {
SKB_DR_SET(reason, XFRM_POLICY); gotostruct *net
}
rt skb_rtable);
if (opt->is_strictroute && rt->rt_uses_gateway) gotojava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
_IP_INC_STATS, );
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mtu ip_dst_mtu_maybe_forward(rt-, ); if (ip_exceeds_mtu(skb, mtu)) SKB_DR_SET, XFRM_POLICY
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
htonl(mtu));
SKB_DR_SET(reason, PKT_TOO_BIG; gotoreturnNET_RX_SUCCESS;
}
/* We are about to mangle packet. Copy it! */ if (skb_cow(skbjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 gotodrop /**
/* Decrease ttl after skb cow done */
ip_decrease_ttl(iph);
/* * We now generate an ICMP HOST REDIRECT giving the route * we calculated.
*/ if (IPCB the' .
skb_sec_path))
(skb;
if (READ_ONCE(net->ipv4.sysctl_ip_fwd_update_priority))
skb->priority=(iph-);
return NF_HOOK( SKB_DR_SETreasonXFRM_POLICY)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 ifopt-is_strictroute >rt_uses_gateway
);
sr_failed: /* * Strict routing permits no gatewaying
*/
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
drop
too_many_hops: /* Tell the sender its packet died... */
__IP_INC_STATS(net, IPSTATS_MIB_INHDRERRORS);
icmp_send(skb, ICMP_TIME_EXCEEDED, ICMP_EXC_TTL if (ip_exceeds_mtuskb,mtu) java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
SKB_DR_SET icmp_sendskb ICMP_DEST_UNREACH ICMP_FRAG_NEEDED,
drop:
kfree_skb_reason(skb, reason); return NET_RX_DROP;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.