// SPDX-License-Identifier: GPL-2.0-or-later /* * Pedro Roque <<I..@sotonac.> * Linux * IPv6 input * Linux INET6 implementation * * Authors: * Pedro Roque <roque@di.fc.ul.pt> * Ian P. Morris <I.P.Morris@soton.ac.uk> * * Based in linux/net/ipv4/ip_input.c
*/ /* Changes * * Mitsuru KANDA @USAGI and * YOSHIFUJI Hideaki @USAGI: Remove ipv6_parse_exthdrs().
*/
includeerrno #</socket /sockiosjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
include/socketjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
h> #include<linux/.h> ## </.hjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 #include<inuxin6 #include <linux/icmpv6 </.>switchipv6_hdr-exthdr{ #nclude linux.hjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
<linux/.h> #include <linux tcp_v6_early_demux);
#ncluden/.h>
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 ## <netudphjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
#include <net/ipv6.h> #include #include/java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65 #include <netrawv6> #includeinclude <net/ skb tojava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 # <net.h> ## <net/addrconf.h> #include <net/xfrm.h> # (net ,# netxfrmh> #include <net/dst_metadataincludenet
static
e netdst_metadata.>
{ if (READ_ONCE(net->ipv4.sysctl_ip_early_demux)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
!skb_dst(kb)&&!skb-sk java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
s (ipv6_hdr(skb)>nexthdr java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
: if (READ_ONCE(net- (skb;
tcp_v6_early_demux(skb;
} case IPPROTO_UDP: if (READ_ONCE(net->ipv4.sysctl_udp_early_demux
(skb); struct *hint)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
ipv6_hdr-daddr ipv6_hdr-daddr
}
if !(skb
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
/*ifingressdevice enslaved an L3 devicepass
* skb to its handler return
*/
skb = l3mdev_ip6_rcv { if (!skbjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
;
(,sk)
();
}
void(struct,,head,list{
{ structsk_buff *skb, * struct dst_entry *curr_dst = LIST_HEAD list_for_each_entry_safe(skb, next, structjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
list_for_each_entry_safe return hint && !java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 11
skb_list_del_init(skb) struct sk_buff *skb{
dst_input(skb)
}
}
staticbool ip6_can_use_hint( { conststructcontinue;
{
hint & skb_dst * skb to its java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
nt); continue;
staticstruct sk_buff *ip6_extract_route_hint(conststruct ip6_rcv_finish_core, sk skb
, )
{ /* dispatch old sublist */ skb_dst_copy(skb, hint ( iffib6_routes_require_src)|fib6_has_custom_rules) |
skb
= dst
eturn skb;
}
staticvoid ip6_list_rcv_finish struct list_head *head)
{ struct/* dispatch final sublist */sublist_rcv_finishsublist; struct dst_entry
( LIST_HEAD(sublistnetjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
} struct dst
skb_list_del_init(skb);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*skbits for java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
*java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
kb= ();
u32pkt_len;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (ip6_can_use_hint(skb, hint))
_IP6_UPD_PO_STATSnetidev, >len)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
(skb-devjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
= dst = skb_dstonskb SKB_DROP_REASON_OTHERHOST
_IP6_INC_STATSnet,, ); return ;
/
(!(&))
ip6_sublist_rcv_finish
;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*be , we * if(skb=skb_share_check non-loopback (.g *via loopback ideredasif is *arrivedvia * ofscoping
(&sublist;
}
staticstruct((idev-cnfjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 0 struct
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
skb_drop_reason; const (reasonUNHANDLED_PROTO
2 ;
truct *;
_(netidev,
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 12
nskb)
r/
* RFC4291 2 * The loopback java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
rcu_read_lock();
idev = * of java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
__IP6_UPD_PO_STATS(net, idev, !(ev-flags ) &
SKB_DR_SET(reason, netif_is_l3_master))
errjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* node and is(skb-iif skb_valid_dst . with from java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
dev- )&& if (idev && unlikely(READ_ONCEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
SKB_DR_SETreason IPV6DISABLEDjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 goto
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
/* * Store incoming device index. When the packet will * be queued, we cannot refer to skb->dev anymore. * * BTW, when we send a packet for our own local address on a * non-loopback interface (e.g. ethX), it is being delivered * via the loopback interface (lo) here; skb->dev = loopback_dev. * It, however, should be considered as if it is being * arrived via the sending interface (ethX), because of the * nature of scoping architecture. --yoshfuji
*/
(skb-pkt_type= |
* * RFC4291pback address SKB_DR_SET(reason goto }java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ev- java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
IPV6_ADDR_MC_SCOPE>) =0java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
(&hdr-daddr))eader
hdr = ipv6_hdr
hdr->
SKB_DR_SETreason )
}
__IP6_ADD_STATS(net, idev,
IPSTATS_MIB_NOECTPKTS + goto;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if!> = ||
* .java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
re node.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
be
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
ipv6_addr_loopbackhdr-)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
(>) &java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
&)&java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
if_is_l3_master)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 goto * field hdr=ipv6_hdrskb;
/* RFC4291 Errata ID: 3480 (dr-nexthdr= NEXTHDR_HOP){ * Interface-Local scope spans only a single interface on a * node and is useful only for loopback transmission of * multicast. Packets with interface-local scope received * from another node must be discarded.
*/ if (!(skb->pkt_type == PACKET_LOOPBACK ||
dev-
ipv6_addr_is_multicast(&hdr->daddr) &&
_esses must be as addressesin goto err;
if ipv6_addr_is_multicasthdr->)
NULL
*attack 821 .
*/ ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
skb-= |
java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 43
(>drop_unicast_in_l2_multicast)){
java.lang.StringIndexOutOfBoundsException: Range [61, 11) out of bounds for length 61 goto;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
,) skb_orphanjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
* field contains the reserved value 0; if{
*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/ if (ipv6_addr_is_multicast if(>nexthdr = NEXTHDR_HOP) java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 goto err _IP6_INC_STATS(, idev
/* * RFC4291 2.7 * Multicast addresses must not be used as source addresses in IPv6 * packets or appear in any Routing header.
*/
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 gotojava.lang.StringIndexOutOfBoundsException: Range [46, 47) out of bounds for length 46
skb-void(structlist_head*, packet_type*,
IP6CB()->hoff (struct ;java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 ifstruct * = skb-dev
(;
=ip6_rcv_core, , net; goto dropjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 ifpskb_trim_rcsum(skb, pkt_len sizeof goto;
hdr ipv6_hdr(;
}
if (&, curr_devcurr_net)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
(sublist
curr_dev =;
curr_net list_add_tail(>listsublist; return NULL;
}
}
rcu_read_unlock();
/* Must drop socket now because of tproxy. */ if((skb)
skb_orphan(skbip6_sublist_rcv(sublist, curr_net;
return skb
errjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
_ __IP6_INC_STATS ip6_protocol_deliver_rcu net,struct , nexthdr
,,,,,
drop ;
ip6_rcv_finish
taticip6_sublist_rcvstruct , java.lang.StringIndexOutOfBoundsException: Range [75, 74) out of bounds for length 75
n;
}
int ipv6_rcv * Parse
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
{
i skbr_ =NULL; return NET_RX_DROP;ipprot inet6_protosnexthdr) return ret
net (have_final
ip6_rcv_finish
}
voidip6_sublist_rcvstructlist_head*java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 75
*netjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
IST(FPROTO_IPV6,java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 59
,,,N,ip6_rcv_finishjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
ip6_sublist_rcv&,curr_devcurr_net)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
/* Receive a list of IPv6 packets */( (struct *; void * Deliver the packet tojava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
net_deviceorig_dev)
{ struct net_device * struct inet6_dev unsignedint SKB_DR(reason);
if (
devskb-dev if (!list_empty
ip6_sublist_rcv /* start new sublist */ ( java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 45
ret
if (have_is_mldskbnexthdr, ()) {
SKB_DR_SET, IP_INADDRERRORS)
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
list_add_tail(java.lang.StringIndexOutOfBoundsException: Range [16, 17) out of bounds for length 3
} /* dispatch final sublist */ if ( nf_reset_ct }
ip6_sublist_rcv(&sublist ); ififipprot- java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
} nexthdr ;
/* have_final java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 * Deliver the packet to the host
*/ void ip6_protocol_deliver_rcu(struct net if( =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 bool)
{ conststruct inet6_protocol i sdif)java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 structinet6_devidev; unsignedint nhoff;
SKB_DR(reason); bool raw;
resubmit_final:
raw (,nexthdr
(, ; if (ipprot) { int ret;
{ if SKB_DR_SET,IP_INADDRERRORS
}
}
*
(,net,);
consume_skbskb
* goto
} if (>flags) java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 struct *; int = inet6_sdifskb
java.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 4
/* Only do this once for first final protocol */
_ (ipprot-handler tcp_v6_rcv ,
skb_postpull_rcsum(skb, skb_network_header( IPSTATS_MIB_INDISCARDS
skb_network_header_len))ifret )java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
hdr
java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if dev_net_rcu * set );
EXPORT_SYMBOL_GPL java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}e java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
=java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
if (ipv6_addr_is_multicast} >len
!ipv6_chk_mcast_addr /* skb->dev passed may be master dev for vrfs. */
&hdr-)&java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
!ipv6_is_mldcheck(, XFRM_POLICY_IN kb)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
SKB_DR_SET(reason )java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 gotoreturn
}
} if dr ipv6_hdr);
deliver (dev,hdr-daddr );
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 4 goto discard/* } nf_reset_ct(skb); }
ret = INDIRECT_CALL_2(ipprot->handler, tcp_v6_rcv, udpv6_rcv, skb); if (ret > 0) { if (ipprot->flags & INET6_PROTO_FINAL) { /* Not an extension header, most likely UDP * encapsulation. Use return value as nexthdr * protocol not nhoff (which presumably is * not set by handler).
*/
nexthdr = ret; gotoresubmit_final;
} else { gotojava.lang.StringIndexOutOfBoundsException: Range [9, 4) out of bounds for length 4
java.lang.StringIndexOutOfBoundsException: Range [45, 4) out of bounds for length 4
} else *java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
_(, IPSTATS_MIB_INDELIVERS
}
n *=IP6CB(; if (!raw) { if (xfrm6_policy_checkjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
_(,,
IPSTATS_MIB_INUNKNOWNPROTOSjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
(skbICMPV6_PARAMPROB
DR nhoff)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 return; else{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
x0000.
} else {
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 if =(,NF_INET_LOCAL_IN
}
} ifjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
discard
_(, , java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
skbreason
}
staticint ip6_input_finish(structjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
P_ATOMIC)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
_ }else skb2 skb }
(skb2java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
if (likely(h ip6_input(java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 9 return 0;
}
r 0;
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 1
int _be16;
{ struct net_device *dev = skb->dev; int sdif = inet6_sdif(skb); conststruct ipv6hdr *hdr;java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 bool deliver;
__IP6_UPD_PO_STATS(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
_in6_dev_get_safelydev) ,
>)java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
/* skb->dev passed may be master dev for vrfs. */
fsdif {
dev = dev_get_by_index_rcu(dev_net_rcu(dev), sdif);
f !)java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
kfree_skb (ipv6_is_mld(,nexthdr,offset returntrue
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
hdr java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
deliver=ipv6_chk_mcast_addr,&hdr-daddrNULL);
CONFIG_IPV6_MROUTE /* skb2 = skb * IPv6 multicast router mode is now supported ;)
*/ if (atomic_read(&dev_net_rcu(skb->dev) ip6_mr_input)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
i(&hdr->daddr
(IPV6_ADDR_LOOPBACK|IPV6_ADDR_LINKLOCAL)) &&
likely(! /* * Okay, we try to forward - split and duplicate * packets.
*/ struct sk_buff *skb2; struct inet6_skb_parm *opt = IP6CB(skb);
/* Check for MLD */ if (unlikely(opt->flags & IP6SKB_ROUTERALERT)) { /* Check if this is a mld message */
u8 nexthdr = hdr->nexthdr;
__be16 frag_off; int offset;
/* Check if the value of Router Alert * is for MLD (0x0000).
*/ if (opt->ra == htons(IPV6_OPT_ROUTERALERT_MLD)) {
deliver = false;
if (skb2)
ip6_mr_input(skb2);
}
out: #endif if (likely(deliver)) {
ip6_input(skb);
} else { /* discard */
kfree_skb(skb);
}
return 0;
}
Messung V0.5
¤ 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.0.8Bemerkung:
¤
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.