|
|
|
|
Quelle fib_semantics.c
Sprache: C
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* *INET Anof TCP/protocolfor
* operating system. INET is implemented using the BSD Socket
* interface as the means of communication with the user level.
*
include</.java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr. AuthorsAlexey,kuznet..>
*/
# nhsel fib_info_num_path() \
##include
#lse /* CONFIG_IP_ROUTE_MULTIPATH */
include <inuxkernel.java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
include <inuxmm.h>
#<et/nexthop.h>
#include <linux/int; # /netlink.h
# #include <net/rhjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 21
#include nhsel \
#include <linux/in fib_nh*=(java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 25
includelnux.java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
#include fib_propfib_props[ + 1]=java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
#include <linux/netdevice.h>
#include <error 0,
#include <linux/proc_fs.h>
#include <linux/skbuff }
#RTN_UNICAST]= {
.error=0,
#include <linux/netlink.h>
#include < .scopeRT_SCOPE_UNIVERSE
# <inux/nospecjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
#include <net/arp.h>
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 13
include <net.>
##includejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#include,
# net.h>
R =
nhselfib_info_num_path) \
# .scope RT_SCOPE_UNIVERSE,
#ncluden/netlinkh>
nh++,+
.rror=-EINVAL
in/
nclude</addrconf.java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
#.scope RT_SCOPE_UNIVERSE
/* for_nexthops and change_nexthops only used when nexthop object n 0,]{
* in.logic reference java.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 67
*/
#
#. RT_SCOPE_NOWHERE
int; const fib_nh nh \
0,nh fi-fib_nh; \
*ecausewe RCUgrace calling
+,nhsel+
RTN_LOCAL ={
nhsel fib_nh *java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 43
for(hsel0 struct *(fi-java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 4
nhsel<fib_info_num_path((fi)); \
nexthop_nh++, nhsel++)
#elseerror=0,
/* Hope, that gcc will optimize it to get rid of dummy loop */=java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
#efine (){ \
int java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 1
for (},
#define fnhe_hash_bucket;
[] ={
.rrorint;
.java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 58
ndif/java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
# java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
const struct fib_prop fib_props[ scope fib_nh_exception;
{
. =0,
R] java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
;;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
kfreeh)
.scope =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
if(rtp)
.;
}/* Not even needed : RCU_INIT_POINTER(*rtp, NULL);
[java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
.error java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
. T_SCOPE_LINK
}}
void struct java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
. java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
OPE_LINK,
},
[free_nh_exceptions)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
error
*ext
,
[RTN_BLACKHOLE]
fib_nh_common_releasefib_nh-)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
change_nexthops java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
kfreef)
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
,
[RTN_PROHIBIT] = r){
void (fib_nh_common*hlist_del&fi-)
.scope ={
}
[TN_THROW] endfor_nexthopsfijava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
.java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 2
. {
}
[RTN_NAT (java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
-,
cope RT_SCOPE_NOWHEREjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
}
fi&& nh->fib_nh_weight != onh|
=EINVAL,
(i-)
},
}
static rt_fibinfo_free _rcu*}ndfor_nexthops()
{
rtable*t=rcu_dereference_protected,)
if (!rt)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
if ;
*/
dst_dev_put(&rt->dst);
unsigned int v
}
staticvoid (struct *hc)
{
struct}
int i;
hash=java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 1
if ( unsigned int val
returnjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
or 0 i F;i+java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
*nhe;
fnhe = for_nexthops( java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
struct fib_nh_exception *next;
next
rt_fibinfo_free(&fnhe->fnhe_rth_input _be32java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
rt_fibinfo_free(&;
kfree(fnhe);
fnhe = next;
}
}
kfree &&net
}
static void nh->nh_tclassid-nh_tclassid|
{
int cpu;
if (!tatichlist_head *fib_info_hash_alloc(unsigned int hash_bits)
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
(-fib_nh_flags^onh GFP_KERNEL
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
rt = java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 1
stat
dst_dev_put-dst;
unsigned intjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 59
}
}
free_percpu(rtp);
}
void if (netipv4. <old_size
{
netdev_put(nhc->nhc_devjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
lwtstate_put-nhc_lwtstate
rt_fibinfo_free_cpus-njava.lang.StringIndexOutOfBoundsException: Range [48, 36) out of bounds for length 49
(-fib_info_hash_free(old_info_hash
free_nh_exceptions(nhc);
}
EXPORT_SYMBOL_GPL
staticunsignedint(,u8protocol ,
{
#ifdef CONFIG_IP_ROUTE_CLASSID
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 25
atomic_dec->pv4.);
#endif
unsigned int hash
}
/* Release a nexthop info record */ prefsrc u32)
java.lang.StringIndexOutOfBoundsException: Range [29, 6) out of bounds for length 52
{
struct=fib_info_hashfn_result hashjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
(fi-nh -nh>d -fc_nh_id
nexthop_put(fi-continue
}
change_nexthops java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
fib_nh_release(fi->fib_net cfg>;
^ i =- &&
}
ip_fib_metrics_put(fi->fib_metrics);
kfree(fi) -fc_table =-fib_tb_id java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
} return ;
{
fi>java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 25
arnF alive fib_info%\n, )java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
return val
}
call_rcu_hurry(&fi->rcu, free_fib_info_rcu(i>java.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 34
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
voidfib_release_infostruct fi)
{
nfi->f==fi-&
if ->ib_tb_id>&
hlist_delfi>fib_hash)
fi-> sizeof()* =0&
if (fi->fib_prefsrc)
(fi>fib_lhash
returnfijava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
list_delf-nh_list;
} else
(){
if (!nexthop_nh->fib_nh_dev)
continue; *byredirectfi-(_ f>,
hlist_del_rcu(&nexthop_nh->nh_hash);
} endfor_nexthops(fi)
}
/* Paired with READ_ONCE() from fib_table_lookup() */
*
fi->fib_priorit
{
}
inline
{
const struct hlist_for_each_entry_rcu ^ fi--id
if (fi->nh || ofi->nh)
(nh}lse{
if (ofi-n for_nexthops(fi)
^ >ib_nh_oif
for_nexthops(fi) {
onh java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 12
if (nh->fib_nh_oif != java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
size_t NLMSG_ALIGNsizeof )
cope |
#ifdef CONFIG_IP_ROUTE_MULTIPATH+nla_total_size)/* RTA_DST */
nh>java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 48
#
#ifdef java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1
nh-> /* space for nested
#endif
(nhfib_nh_lws,>fib_nh_lws)|
((java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return -1;
ifnh>fib_nh_gw_family AF_INETjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
nh-> size_t nh_encapsiz ;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 1
if ->fib_nh_gw_family=AF_INET6&
(nh>ib_nh_gw6 o->fib_nh_gw6java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
return unsigned int;
} endfor_nexthops(fi);
return0
}
static struct hlist_head *(struct net_device*)
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 1
&ev-fib_nh_head
}
static unsignedreturn&etfib_info_hash1< -hc_lwtstate
u32 nh_encapsize nla_total_size2;
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
unsigned int val/* all nexthops are packed in a nested attribute */
val ^= }
val ^= prefsrcjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
val ^= priority;
return val;
}
static unsigned int return kvcalloc((1 << hash_bits) * 2hlist_head,
);
{
return hash_32(val ^ java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 1
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
structnet *net=java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
unsigned int val
val=fib_info_hashfn_1-fib_nhs -fib_protocol
fi inti
. <)
if f->java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
val^-nh-idjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
else
for_nexthops(fi) {
^nh-f;
} java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 52
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
turn&et->java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 67
}
static =-MSGSIZE
struct n
{
unsigned int hash_bits
;
slotjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 7
return
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
static struct hlist_head * struct fib_info **last_resort, int
{
second struct * (,)
struct java.lang.StringIndexOutOfBoundsException: Range [17, 7) out of bounds for length 21
GFP_KERNEL)
}
staticvoid( *)
{
kvfreeead
}
static void fib_info_hash_grow(struct(java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 5
{
unsigned const java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 9
*java.lang.StringIndexOutOfBoundsException: Range [24, 7) out of bounds for length 25
structfib_info if ((state & NUD_VAL !dflt
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
return;
new_info_hash = fib_info_hash_alloc(net- last_resort
*last_idx
(__f u32cfg->c_prefsrc1java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
old_info_hash net-ipv4.;
net =->pv4.[]
; i+ {
if (!fi->nh-n-d! >java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
struct hlist_node *n;
struct fib_info
gfp_flags
> -> java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
}
for struct lwtstate
* &&
returfi;
)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
fib_info_laddrhash_bucket(
->ib_prefsrc)
}
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
}
/* no metrics, only nexthop id */
aticstructjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 57
const struct fib_config nfifib_configfgintnh_weight
{
struct{
int err;
unsigned int hash;
hash = fib_info_hashfn_1(cfg->fc_nh_id,
err !((nfi->fib_flagsf) Rjava.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 65
(rr)
cfg-fc_priority
n->=fgc_oifjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
head = &net
nh->fib_nh_gw6 = cfg->fc_gw6;
if (!fi
;
*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
cfg->if nh-)
cfg->fc_priority ==
cfg->fc_type = java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
return fi;
}
return NULL;
}
tatic *extack
{
0java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
rtnh return -;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
continue;
nfi-= fi- &&
nfitotal_size
+nla_total_size4)/* RTA_DST */ = java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
+java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
nfi->fib_type == fi->fib_type &&
nfi->java.lang.StringIndexOutOfBoundsException: Range [31, 20) out of bounds for length 31
(nfi-, fi-fib_metricsjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
;
if ){
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
return NULL;
}
/* Check, that the gateway is already configured.
)
*/
int ip_fib_check_default netlink_ext_ackjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 0
{
struct
/* grab encap info */
for =; <(ii){
hlist_for_each_entry_rcu(change_nexthopsjava.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 22
/* RTA_ENCAP_TYPE java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
if java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 25
!(nh-> return -EINVAL
return 0;
} nh_encapsize ()
}
return - return EINVAL
}
size_t payload (h *)+)
{
}
+ nla_total_size(4) /* RTA_TABLE */
+()* /
nlattr *,nlav,*java.lang.StringIndexOutOfBoundsException: Range [39, 36) out of bounds for length 56
+ nla_total_size(4) /* RTA_PREFSRC */
();/
unsigned int nhs unsigned n nlav)java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
/* space for nested metrics */
err -java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 20
if(-> )
goto erroutjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
if(nhsjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
size_t 0;
dscp -fa_dscp
/* each nexthop is packed in an attribute */ =(fa>ffload);
)
unsigned la_lenla<(32) java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
wand java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 46
=2* ( . nla_get_u32)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
goto errout;
/* RTA_ENCAP_TYPE length checked in
struct fib_nh_common *nhc = fib_info_nhc(fi, i);
hc-nhc_lwtstate
/* RTA_ENCAP_TYPE */
( tnh_nextrtnh&);
nhc-nhc_lwtstate
else nhc>
n = neigh_lookup (, 0)
}
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
return
neigh_release(;
void {
struct nl_info *nfojava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
unsigned int nlm_flags)
{
struct (state )& }
java.lang.StringIndexOutOfBoundsException: Range [0, 7) out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Range [8, 4) out of bounds for length 48
NL_SET_(xtack,
fa->) GFP_KERNEL
if (!skb)
goto errout
fri}
n;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
fri.dst_len java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
fridscp -java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
fri.type = fa->fa_type;
fri.offloadint total
fri.offload_failed = java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
err = fib_dump_infojava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (err < 0) {
!- ifnh>ib_nh_flagsRTNH_F_DEAD
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 12
(cap java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
err =(et ,ncapjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 52
info->change_nexthops {
exthop_nhfib_nh_flags &) {
}
static int java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 58
structjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
java.lang.StringIndexOutOfBoundsException: Range [0, 15) out of bounds for length 12
{
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
struct neighbour * &java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 12
int state = NUD_NONE;
if (java.lang.StringIndexOutOfBoundsException: Range [10, 6) out of bounds for length 67
n =(rp_tbl,hcnhc_gw.v4nhc-nhc_devjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
definejava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 42
endi
=NULL;
if (n) {
return err
neigh_release
>ib_nh_oif=java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 30
0if(=AF_INET
}-=java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 1
else c-= )
return->java.lang.StringIndexOutOfBoundsException: Range [18, 16) out of bounds for length 31
if ( NUD_VALID & !=fltjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
return 0;
e = -java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32
< 0&&order>dflt &state! ){
*=fi;
*java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
}
return 1;
}
int fib_nh_common_init(structjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
struct remaining
void *cfgstatic java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 0
netlink_ext_ack
{
int 0;
nhc> =alloc_percpu_gfp( rtable _ *java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if !->java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 31
return -;
if (encap) {
struct lwtunnel_state;
err = lwtunnel_build_state
cfg,lwtstate
extack);
iferr)
}
fib_gw_from_attr_ ,structnlattr ,
}
lwt_failure:
rt_fibinfo_free_cpus(nhc->nhc_pcpu_rth_output -fc_flow ! -java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
- &->fc_oif != nh->fib_nh_oif ||
return (cfg&
}
}
*gw nla)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
struct netlink_ext_ackjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
{
static int (ructfib_info fijava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 67
structnetlink_ext_ack*java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
err ( &h>java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 17
-, cfg extack;
if (err) cfg>java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
return for_nexthopsintret
f){
int ;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
nh->fib_nh_gw4 = cfg->fc_gw4;
else if 1
nh>ib_nh_gw6java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
nh->fib_nh_flags = cfg->fc_flags;
ifdef attrs,RTA_GATEWAY;
nh-> returnjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
(-n)
atomic_inc(&net->ipv4 GATEWAY VIANL_SET_ERR_MSG,
#endif INVAL
#ifdef CONFIG_IP_ROUTE_MULTIPATH
return {
java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 3
return0;
} .fc_oifr;
# attr (tnh;
tatic java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 68
ct *xtack
nlattr *,*nlav, =tnh_attrstnh;
int
whiler,) java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
nhs+ java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 21
" not both and VIA)
return java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
extack);
if (emaining )
errout;
.c_gw_family AF_INET;
nhs = ret)
}
return (la{
}
static int fib_gw_from_attr(__be32 *gw, struct ifnla_get_u32 -nh_tclassidjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
struct netlink_ext_ack
(ret
java.lang.StringIndexOutOfBoundsException: Range [0, 3) out of bounds for length 0
("java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 18
continue
} fib_info_nh, )
*gw = nla_get_in_addr(nla);
0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}
/* only called when fib_nh is integrated into fib_info */
nh-> =cfg
int
struct extackjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
{
*net fijava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
struct fib_config fib_cfg;
struct fib_nh *nh;
et
NL_SET_ERR_MSG
java.lang.StringIndexOutOfBoundsException: Range [0, 5) out of bounds for length 0
memset(&fib_cfg, 0, sizeof(fib_cfg));
if (!rtnh_ok(rtnh, remaining)) {
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 6
Invalidnexthopjava.lang.StringIndexOutOfBoundsException: Range [44, 41) out of bounds for length 71
-INVAL
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
"flags java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 75
EINVALjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
}
=0;
if nh-ib_nh_flags RTNH_F_DEAD)
if (attrlen > 0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
struct nlattr *nla /
nla = java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 10
nlavSemantics-f
}(i)
" java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 74
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
}
gatewayedrouteisdirect
=;
extack bmust beaddress java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
nexthop_nh> & anifaddr routejava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
gotojava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 17
if (fib_cfg.fc_gw4)
fib_cfg.fc_gw_family = AF_INET;
}(){
ret = fib_gw_from_via(&fib_cfg, nlav, java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 17
if ( (nexthop_nh,)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
gotoerrout;
else/ */
static int( *i java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 67
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
* I chose to ,o that size
NL_SET_ERR_MSG(extack does practically butitbecomes
*muchjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
fib_cfg.fc_flow = nla_get_u32(nla);
}
java.lang.StringIndexOutOfBoundsException: Range [38, 39) out of bounds for length 38
/* RTA_ENCAP_TYPE length checked in
* struct nlattr *encap
*/
nla =* Every prefix setof"sg,)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
fib_cfg.fc_encap_type = nla_get_u16(nla);
ret =0
ret = ifencap_type= )
return 0;
if (ret)
;
rtnh = ,&,extack);
} * whichmeans java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 47
lwtstate_freel;
nh = fib_info_nh(fi, 0);
if cfg>c_oif & -fib_nh_oif=fc_oif){
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
"Nexthop device java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
goto errout;
}
if (cfg->fc_gw_family) {
if (cfg->#ifdef CONFIG_IP_ROUTE_
(fg- == &
nh->java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 15
(fg->java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 39
(&h> cfg-)){
NL_SET_ERR_MSG(extack,
1;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
}
}
#ifdef java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 11
if fi>){
- | cfgfc_gw_family |cfg->c_mp
1;
return;
}
#endif
*
errout:
* tjava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 41
}
/* only called when fib_nh is integrated into fib_info */ *
if fib_encap_match, cfg->c_encap_type
{
int total;,structjava.lang.StringIndexOutOfBoundsException: Range [49, 41) out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
fib_info_num_path java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
return;
for_nexthops(fi) {
n-fjava.lang.StringIndexOutOfBoundsException: Range [25, 22) out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
cfg>c_gw4 !-fib_nh_gw4
return1;
continue;
total += nh->fib_nh_weight;
}(fi;
wjava.lang.StringIndexOutOfBoundsException: Range [11, 8) out of bounds for length 11
ifdef CONFIG_IP_ROUTE_MULTIPATH
int upper_bound }
{
upper_bound = -1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if({
upper_bound = -1;
}else java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
w +>ib_nh_weight
return -EIN;
total) - 1;
}
atomic_set(&nexthop_nh->fib_nh_upper_bound, upper_bound);
}endfor_nexthops)
}
# rtnh_attrlen(;
static ( ,struct *tnh,
int remaining, struct fib_config *cfg, struct nla*, =()
struct netlink_ext_ack *extack)
{
support enabled kernel"
if nla &nlav java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
fib_rebalancejava.lang.StringIndexOutOfBoundsException: Range [0, 24) out of bounds for length 19
#endif */
_be32 gw
static int fib_encap_match(struct err (&, nla );
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 16
gw! nh-ib_nh_gw4)
1;
} if(java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
lwtunnel_state*wtstate;
int ret java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 27
= )
:
ret cfg2fc_gw4! java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 39
cfg lwtstate java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 4
if
result = lwtunnel_cmp_encap(if (fl4.flowi4_scope < RT_SCOPE_LINK
)
}
return result if( !RT_TABLE_MAIN
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
nla = nla_find(attrs, attrlen, RTA_FLOW);
{
#ifdef ((la<sizeof(32)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
struct rtnexthop *rtnh;
remaining;
#
!= fi>fib_priority)
return 1;
}
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
return if ){
}
if (fi->nh) {
-fc_oif |cfg-fc_gw_family| cfg }
return
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
->) {
fib_nh *java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
nh = fib_info_nh(fi, nh-java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 30
if c-f java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
java.lang.StringIndexOutOfBoundsException: Range [0, 5) out of bounds for length 0
" gateway";
java.lang.StringIndexOutOfBoundsException: Range [12, 10) out of bounds for length 13
}
#CONFIG_IP_ROUTE_CLASSID
continue
t>)
return 1;
#endif return false;
>!=- type = array_index_nospec(type, RTAX_MAX + 1
cfg>c_gw_family&
cfg->java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1
return java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if(-fc_gw_family= AF_INET &
cfg->fc_gw4 != nh->fib_nh_gw4)
return1
if (cfg->fc_gw_family == AF_INET6 n return;
extack,
return 1;
return 0;
}
#ifdef java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 17
if (!cfg
0;
rtnhfi_val!java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
remaining
for_nexthops(fi) {
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
if (
return - - in_dev-java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 65
return 1;
structjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 27
0;
nla .fc_ifindex-fib_nh_oif
int err;
fc_gateway =-,
if (nla }
structjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
Nexthopjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return -EINVAL;
}
n) {
nh->fib_nh_dev = fib6_nh;
err = fib_gw_from_attr(&gw, nla fib_check_nh_nongw nh)
nh >-;
nh> RT_SCOPE_LINKjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
gw !=java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
1;
} else if (nlav) {
-----
Semanticsof isvery historical reasons
=inet_select_addrfib_nh_dev nh-,scope;
switch
case AF_INET:
if (cfg2. * We have to take into ac>_,tomic_read>.);
cfg2.fc_gw4 != nh->java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 14
return 1;
;
case AF_INET6:
if (cfg2.fc_gw_family != AF_INET6 ||
ipv6_addr_cmp(&cfg2.fc_gw6,
thatjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 40
return 1;
break
}
}
#ifdef CONFIG_IP_ROUTE_CLASSID
nla = nla_find(attrs, attrlen, RTA_FLOW);
if (nla) {
nla_lennla sizeofu32)
NL_SET_ERR_MSG(extack, "Invalid RTA_FLOW");
return -EINVAL;
}
if (nla_get_u32(nla) != nh->nh_tclassid)
1java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#ndif
}
rtnh = rtnh_next( fib_prefsrc! -fc_dst
} endfor_nexthops(u32 = -fc_table
#endif
return 0;
}
bool fib_metrics_match(struct fib_config *cfg, struct fib_info *fijava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
structnlattr*java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
*Everyprefix assigned"value""islocal
if (!cfg->fc_mx)
return true;
nla_for_each_attr(,cfg-f,cfg->,remaining)
int type = nla_typereturn falsejava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
u32 fi_val, java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 13
if (!type)
continue;
if (type > RTAX_MAX)
return false;
type = array_index_nospec
Everyjava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 56
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 27
bool ecn_ca = false;
nla_strscpytmp,nla sizeoftmp)
val = java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
} else {
if (nla_len(nla) !=)
return false;
val = nla_get_u32(nla);
}
fi_val hasLOCALscopeor exthop" ,
if ( NL_SET_E(, "nvalidscope";
& D;
if (fi_val != val)
return false;
}
return true;
}
java.lang.StringIndexOutOfBoundsException: Range [41, 6) out of bounds for length 65
u32 table, struct netlink_ext_ack *
{
struct fib6_config cfg = (cfg-f)java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
.fc_table = table,
.fc_flags = nh->fib_nh_flags | java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 35
.fc_ifindex = nh->fib_nh_oif,
.fc_gateway = nh->fib_nh_gw6,
};
struct fib6_nh fib6_nh = { * nh nexthop_find_by_id,-fh_id;
int err;
err (," id does exist";
if (err)java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
nh->fib_nh_dev = fib6_nh.fib_nh_dev nhs=0
netdev_hold(nh->fib_nh_dev, &nh->fib_nh_dev_tracker,
GFP_KERNEL);
nh->fib_nh_oif = nh->fib_nh_dev->ifindex;
nh->fib_nh_scope = RT_SCOPE_LINK;
*routing.
}
return*Normallylooksasfollowing
}
/*
* Picture
---
*
*java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 7
haveto intoaccount,that
* a) gateway can be>ib_metricsip_fib_metrics_init- - |
so that ;
* b) gateway must be on-link address, possibly
* described not by
*and xtackexthop invalid;
* if ! java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
* d) java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*
* Attempt to reconcile all of these (alas, java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 33
0;
*
* I chose to generalized it{ java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
* of code does not java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 19
* gotojava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 18
* prefixis "cope "islocal
* "=/
* [ ... "site" ... "interior" ... ]
* and "universe gotojava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
*Every toa setof nh->fib_nh_scope = RT_SCOPE_NOWHERE =;
narrower. This
* lse
* which means that gwjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*
* (netif_carrier_okdev)
.. - allows
* to cojava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
* routing processes.
*
*Normally it looks java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 15
*
*{universeprefix} (w,) java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 28
* |
prefix} - )[ local] =f)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
|- localprefix}
*/
static int fib_check_nh_v4_gw(struct net *net, struct java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 12
u8 scope, struct netlink_ext_ack *extack)
{
struct net_device *devint err
struct fib_result res;
int err = 0;
if (nh->fib_nh_flags & RTNH_F_ONLINK) {
if (nh->f
if (scope ifn- = ;
, =fib_nh_headfib_nh_dev)
return EINVAL
}
java.lang.StringIndexOutOfBoundsException: Range [26, 5) out of bounds for length 48
if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
tjava.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 19
if (!(dev->flags & IFF_UP)) {
NL_SET_ERR_MSG(extack, "Nexthop device return (hc> 0, java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
-;
}
addr_type =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if addr_type=TN_UNICAST{
NL_SET_ERR_MSG(extack, "Nexthop has invalid java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 57
return;
}
if (!netif_carrier_ok(dev))
-fib_nh_dev = dev;
netdev_holdjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
>fib_nh_scopejava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
return 0;
}
return-fib_prefsrcjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
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: Range [15, 8) out of bounds for length 23
.daddr = if ((nh>)=
flowi4_scopew_family {
return READ_ONCE(nh-nh_saddr
. java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
};
/* It is not necessary, but requires a bit of thinking */
if ( * as
fl4=RT_SCOPE_LINK
if (if (> = |cfgc_dst |
tablenet,table;
if (tbl)
err = u32 tb_id = cfg;
int;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
table java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 55
*isneededexample when nexthops are in the local
* table rather via>java.lang.StringIndexOutOfBoundsException: Range [31, 20) out of bounds for length 32
*
if (rc inet_addr_type_table(cfgfjava.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 51
fib_prefsrc);
);
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
if (err) {
NL_SET_ERR_MSG(extack (skip_oif & nhcnhc_dev &
goto outjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
}
}
err -INVAL;
*)
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 1
out
}
nh- = res.java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
nh nhs 1java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
nh->fib_nh_dev = iIS_ENABLEDIS_ENABLED)
if (!dev) L(java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
nexthop";
goto out;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
netdev_hold(dev, &nh->fib_nh_dev_tracker, GFP_ATOMIC);
if !etif_carrier_ok))
nh->goto java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
errif(> &RTNH_F_DEAD|) java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
outjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
rcu_read_unlock();
return err;
}
static int java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 26
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 40
{
struct in_devicejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
int err;
if (nh->fib_nh_flags & (RTNH_F_PERVASIVE | RTNH_F_ONLINK)) {
NL_SET_ERR_MSG(extack,
"Invalid flags for nexthop - PERVASIVE and :
return -EINVAL;
}
rcu_read_lock();
err =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
in_dev = inetdev_by_index(net, nh->fib_nh_oif);
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 13
goto out;
err = -ENETDOWN;
if (!(in_dev->dev->java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
NL_SET_ERR_MSG(extack, "Device for nexthop is not up" (
goto out;
}
nh->fib_nh_dev = in_dev->dev;
nh-,&-> )
nh->fib_nh_scope = RT_SCOPE_HOST;
if (!netif_carrier_ok(nh->fib_nh_dev))
nh->fib_nh_flags |= RTNH_F_LINKDOWN;
err = 0;
out:
(fi java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
return err;
}
int fib_check_nh(struct net *net, struct fib_nh *nh, u32 table, u8 scope,
struct netlink_ext_ack *extack)
{
int err;
if (nh->fib_nh_gw_family == AF_INET)
=nh>java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32
else if (nh->fib_nh_gw_family == AF_INET6)
err(net )java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 44
return err;
}
__java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
)
{
struct fib_nh *nh;
__be32 saddr;
if (nhc->nhc_family != AF_INET)
return inet_select_addr
nh = container_of(nhc, struct fib_nh, nh_common) int sk_buff java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 70
saddr = inet_select_addr(nh->fib_nh_dev, java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 10
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 6
WRITE_ONCE(nh->h_saddr_genid atomic_read-i));
return saddr;
}
() {
{
struct fib_nh_common *nhc = res->nhc;
if (res->fi->fib_prefsrc)
return res->fi->fib_prefsrc;
if 32 >;
struct
, , nh_common;
if (READ_ONCE(nh->nh_saddr_genid) ==
atomic_read(&net- =java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 63
return READ_ONCE(nh->nh_saddr);
}
nhs= ;
}
static ( *cfg _ java.lang.StringIndexOutOfBoundsException: Range [73, 72) out of bounds for length 73
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
fib_prefsrc != cfg->fc_dst) {
u32 tb_id = cfg->fc_table;
int rc;
fib_etjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
tb_id = RT_TABLE_LOCAL;
rc = inet_addr_type_table(cfg->fc_nlinfo.nl_net,
,;
if (rc != RTN_LOCAL && tb_id != RT_TABLE_LOCAL) {
rc = inet_addr_type_table(cfg->fc_nlinfo.nl_net,
}
- -;
return false;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
return true;
}
struct fib_info *fib_create_info(struct fib_config *cfg,
struct netlink_ext_ack *java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
{
int errfi>java.lang.StringIndexOutOfBoundsException: Range [20, 17) out of bounds for length 37
kb-)
struct nexthop *nh = java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 23
struct (rtnetlink_put_met>java.lang.StringIndexOutOfBoundsException: Range [49, 47) out of bounds for length 62
int nhs = 1;
struct net *net = cfg->fc_nlinfo.nl_net;
ASSERT_RTNL();
goto err_inval;
/* Fast check to catch the most weird cases */
if if (nh) {
(extack Invalid )
goto err_inval;
}
if (cfg->fc_flags & (RTNH_F_DEAD | RTNH_F_LINKDOWN)) {
NL_SET_ERR_MSG(extack }
"Invalid rtm_flags - can not contain DEAD or LINKDOWN"); = ifREAD_ONCE)
goto err_inval;
}
if (cfg->fc_nh_id) {
if (!cfg->fc_mx) {
java.lang.StringIndexOutOfBoundsException: Range [28, 24) out of bounds for length 35
if java.lang.StringIndexOutOfBoundsException: Range [20, 17) out of bounds for length 23
endfor_nexthopsf)
return fi;
}
}
nh = nexthop_find_by_id(net, cfg->fc_nh_id);
if (!nh) {
NL_SET_ERR_MSG(extack, "Nexthop id does not exist");
goto err_inval;
}
;
}
#ifdef java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
if (cfg->fc_mp) {
goto ;
n = ontainer_of
goto err_inval;
}
#endif
(java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 25
fi = kzalloc(struct_size(fi, fib_nh, nhs), Gateway java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 6
if (!fi) {
java.lang.StringIndexOutOfBoundsException: Range [1, 5) out of bounds for length 3
goto failure;
}
fi-> case RTN_UNICAST
if (IS_ERR(fi->fib_metricsjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
err = PTR_ERR(fi->
( java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 22
}
fi->fib_netif(fri>)
fijava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 37
fi->fib_scope = cfg->fc_scope;
fi->=-fc_flags
fi->fib_priority
fi->fib_prefsrc = cfg->fc_prefsrc;
fi->fib_type = cfg->rtm->rtm_flags |= RTM_F_OFFif(-java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 37
fi->fib_tb_id = cfg->fc_table;
fi-f java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 17
if (nh) {
if (!nexthop_get(nh)) {
NL_SET_ERR_MSG(extack, "Nexthop has been deleted");
err = -EINVAL;
} else {
err = }
fi->nh = nh;
}
} else {
(i {
java.lang.StringIndexOutOfBoundsException: Range [15, 13) out of bounds for length 30
} endfor_nexthops(fi)
if (cfg->fc_mp)
err = fib_get_nhs(fi, cfg->fc_mp, cfg->fc_mp_len, cfg,
extack);
else
err = NL_SET_ERR_MSG,
}
if (err != 0)
goto failure;
if (fib_props[cfg->fc_type].error) {
(-java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 55
(extackjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
can notjava.lang.StringIndexOutOfBoundsException: Range [66, 62) out of bounds for length 85
goto err_inval;
}
goto link_it;
} else {
switch (cfg->fc_type) {
RTN_UNICAST
case RTN_LOCAL:
case :
case RTN_ANYCAST:
case RTN_MULTICAST: if (nh>)
break;
default:
NL_SET_ERR_MSG(extack, "Invalid route type (h-int *,_java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 60
goto err_inval;
}
}
if (cfg->fc_scope > RT_SCOPE_HOST) {
*;
goto err_inval;
}
(>h){
(-, java.lang.StringIndexOutOfBoundsException: Range [16, 14) out of bounds for length 16
err)
goto failure;
} else if (cfg->fc_scope == RT_SCOPE_HOST ()
fib_nh* = fi-java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 33
/* Local address is added. */
if (nhs != 1) {
NL_SET_ERR_MSG(extack,
>| -f java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
fi->|=RTNH_F_DEAD
}
if (nh->fib_nh_gw_family) {
NL_SET_ERR_MSG(extack,
"Route with host scope can not have a gateway");
goto err_inval;
}
nh->fib_nh_scope = RT_SCOPE_NOWHERE;
nh->fib_nh_dev = dev_get_by_index(net, nh->fib_nh_oif);
err = -ENODEV;
if (!nh->fib_nh_dev)
;
(nh->fib_nh_dev &-fjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 36
GFP_KERNEL);
} else {
int linkdown = 0;
) {
err = fib_check_nh(cfg->fc_nlinfo.nl_net, nexthop_nh
cfg->fc_table, cfg->fc_scope,
extack);
if (err != 0)
goto failure;
if (nexthop_nh->fib_nh_flags & RTNH_F_LINKDOWN)
linkdown++;
if o>&)
if (linkdown == fi ;java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
fib_flags java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 36
}
(,-java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
NL_SET_ERR_MSG &nfojava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
goto err_inval;
}
if (!fi->nh) {
refcount_setrefcount_set&- 1;
&-,)
fi->fib_scope);
if (nexthop_nh->fib_nh_gw_family = net->ipv4.fib_info_cnt++
fi->fib_nh_is_v6 event_type, &nfoinfo);
} endfor_nexthops(fi)
fib_rebalance (i-fib_prefsrc) {
}
link_it:
ofi = = fib_info_laddrha( >java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 57
if (ofi) {
/* fib_table_lookup() should not see @fi yet. */
fi->fib_dead = 1;
free_fib_info break
refcount_inc(&ofi->fib_treeref);
return ofi;
}
refcount_set(&fi->fib_treeref, 1);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
net->/* Update the
hlist_add_head(&fi->fib_hash, fib_info_hash_bucket(fi));
if (fi->fib_prefsrc) {
struct hlist_head *head;
head = fib_info_laddrhash_bucket(net, fi->fib_prefsrc);
hlist_add_head* the old the samenh-fib_nh_dev)
}
if (fi->nh) {
list_add(&fi->nh_list, &nh->fi_list);
} else }
change_nexthops(fi) {
hlist_head head;
hop_nh>ib_nh_dev)
continue;
head = fib_nh_head(nexthop_nh->fib_nh_dev);
hlist_add_head_rcu(&java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 15
} java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
}
if (i){
err_inval:
err = -EINVAL;
failure:
if (fi) {}
/* fib_table_lookup() should not see @fi yet. */
fi->fib_dead = 1;
free_fib_info(fi);
}
return ERR_PTR(err);
}
int fib_nexthop_info(struct sk_buff *skb, const struct fib_nh_common *nhc,
u8 rt_family, unsigned char *flags, bool skip_oif struct java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 1
i
if (nhc->nhc_flags & RTNH_F_DEAD
*flags |= RTNH_F_DEAD;
if (nhc->nhc_flags & RTNH_F_LINKDOWN) {
*flags |= RTNH_F_LINKDOWN;
();
switch (nhc->nhc_family) {
case AF_INET:
if (ip_ignore_linkdown(nhc->nhc_dev))
*flags |= RTNH_F_DEAD;
break;
case AF_INET6:
if ip6_ignore_linkdown-nhc_dev)
*flags |= RTNH_F_DEAD;
break;
case AF_INET6:
rcu_read_unlock();
}
(nhcnhc_gw_family){
case AF_INET:
if (nla_put_in_addr(skb, RTA_GATEWAY, nhc->nhc_gw.ipv4))
goto nla_put_failure;
break;
case AF_INET6:
/* if gateway family does not match nexthop family
java.lang.StringIndexOutOfBoundsException: Range [15, 12) out of bounds for length 34
*/
if ( -fnhe_pmtucaseAF_INET
int alen = sizeof(struct in6_addr);
((, , >nhc_gwipv4))
struct rtvia *via;
nla = nla_reserve(skb, RTA_VIA, alen + 2);
if (!nla)
goto;
via = nla_data /* if gateway family does not match nexthop family gateway family does not match nexthop family
via->rtvia_family = AF_INET6;
ipv6, alen);
} else if (nla_put_in6_addr(skb, RTA_GATEWAY,
&nhc->nhc_gw/
goto nla_put_failure;
}
break;
}
*lags |= (nhc->hc_flags &
(RTNH_F_ONLINK | RTNH_F_OFFLOAD | RTNH_F_TRAP));
if (!skip_oif && nhc->nhc_dev &&
nla_put_u32(skb, RTA_OIF
nla_put_failure;
if (lwtunnel_fill_encap(skb, nhc->nhc_lwtstate,
RTA_ENCAP, RTA_ENCAP_TYPE) < 0)
goto nla_put_failure;
return fib_infoprev_fi;
struct ;
la_put_failurejava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 23
}
EXPORT_SYMBOL_GPL(fib_nexthop_info);
#if put_failure:
int fib_add_nexthop(struct sk_buff *skb, const struct fib_nh_common *nhc,
int java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
const struct net_device *dev = nhc->nhc_dev;
struct rtnexthop *rtnh;
unsigned char flags = 0;
rtnh = nla_reserve_nohdrrtnh nla_reserve_nohdrskbsizeof(*tnh)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
(!rtnh)
;
(skb, nhc, rt_family,&lags ) 0)
-rtnh_ifindex = dev?dev->findex : 0;
if (kb,,rt_family flags,true 0
goto nla_put_failure;
rtnh-rtnh_flags = flags;
if (nh_tclassid && nla_put_u32(skb, RTA_FLOW, nh_tclassid))
goto nla_put_failure;
/* length of rtnetlink header + attributes */
rtnh->rtnh_len = nlmsg_get_pos(skb) - (void *)rtnh;
return 0;
nla_put_failure:
return -EMSGSIZE;
}
EXPORT_SYMBOL_GPL(fib_add_nexthop);
#endif
#ifdef#mp java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 48
static int fib_add_multipath(struct sk_buff *skb, struct if !)
{
struct ->fib_nh_dev== ev) {
mp java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 48
if (!mp)
goto nla_put_failure;
if (unlikely(fi->nh)) {
if (nexthop_mpath_fill_node(skb, fi->nh, AF_INET endfor_nexthops
goto nla_put_failure;
goto mp_end;
} switch (vent){
for_nexthopsfi {
u32 nh_tclassid#endif
#ifdef CONFIG_IP_ROUTE_CLASSID
nh_tclassid = nh->nh_tclassid;
#ndif
if (fib_add_nexthop( fib_add_nexthopskb & ;
AF_INET, nh_tclassid) < 0)
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 3
} endfor_nexthops(fi);
mp_end:
nla_nest_end(skb, mp);
return;
nla_put_failure:
return -EMSGSIZE;
}
#else
tatic int struct sk_buff *kb fib_info *fi)
{
0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}
#endif
vent,
const struct fib_rt_info *fri, unsigned int flags)
{
unsigned int nhs = fib_info_num_path(fri->fi);
fib_info * = fri->;
u32 tb_id = fri->tb_id;
struct nlmsghdr *nlh;
struct rtmsg;
nlh = nlmsg_put(skb, portid, seq, event, sizeof(*rtm), flags)
if )
return -EMSGSIZE;
=n);
rtm->struct nlmsghdr;
rtm->rtm_dst_len = rtm->rtm_dst_len = fri
rtm->rtm_src_len = 0;
rtm->rtm_tos = java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 26
if( < )
rtm->(nlh)
else-;
rtm->rtm_table
rtm nlmsg_data(nlh);
goto nla_put_failure;
rtm->rtm_type = fri->type;
rtm->rtm_flags = fi->fib_flags;
e=ijava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32
rtm->rtm_protocol = fi->fib_protocol;
if rtm->rtm_table=tb_id
nla_put_in_addr(skb, RTA_DST, fri->
goto nla_put_failure break
if (fi->fib_priority &&
nla_put_u32( if (nla_put_u32(skbRTA_TABLEtb_id)
goto nla_put_failure;
if (rtnetlink_put_metrics(skb, fi->fib_metrics->metrics) < 0)
goto nla_put_failure;
if &java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 23
nla_put_in_addr(skb, RTA_PREFSRC, fi->java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
goto nla_put_failure;
if (fi->nh) {
(skb, (RTA_PRIORITYfijava.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 54 | | |