Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
a35ed119
Commit
a35ed119
authored
Sep 17, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge davem@nuts.davemloft.net:/disk1/BK/net-2.6
into kernel.bkbits.net:/home/davem/net-2.6
parents
99643fc4
e24181d0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
33 deletions
+23
-33
net/ipv4/fib_semantics.c
net/ipv4/fib_semantics.c
+4
-5
net/ipv4/route.c
net/ipv4/route.c
+13
-8
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_policy.c
+6
-20
No files found.
net/ipv4/fib_semantics.c
View file @
a35ed119
...
...
@@ -52,7 +52,8 @@ static unsigned int fib_hash_size;
static
unsigned
int
fib_info_cnt
;
#define DEVINDEX_HASHBITS 8
static
struct
hlist_head
fib_info_devhash
[
DEVINDEX_HASHBITS
];
#define DEVINDEX_HASHSIZE (1U << DEVINDEX_HASHBITS)
static
struct
hlist_head
fib_info_devhash
[
DEVINDEX_HASHSIZE
];
#ifdef CONFIG_IP_ROUTE_MULTIPATH
...
...
@@ -229,7 +230,7 @@ static struct fib_info *fib_find_info(const struct fib_info *nfi)
static
inline
unsigned
int
fib_devindex_hashfn
(
unsigned
int
val
)
{
unsigned
int
mask
=
((
1U
<<
DEVINDEX_HASHBITS
)
-
1
)
;
unsigned
int
mask
=
DEVINDEX_HASHSIZE
-
1
;
return
(
val
^
(
val
>>
DEVINDEX_HASHBITS
)
^
...
...
@@ -1040,9 +1041,7 @@ int fib_sync_down(u32 local, struct net_device *dev, int force)
if
(
force
)
scope
=
-
1
;
BUG_ON
(
!
fib_info_laddrhash
);
if
(
local
)
{
if
(
local
&&
fib_info_laddrhash
)
{
unsigned
int
hash
=
fib_laddr_hashfn
(
local
);
struct
hlist_head
*
head
=
&
fib_info_laddrhash
[
hash
];
struct
hlist_node
*
node
;
...
...
net/ipv4/route.c
View file @
a35ed119
...
...
@@ -2206,22 +2206,27 @@ int __ip_route_output_key(struct rtable **rp, const struct flowi *flp)
return
ip_route_output_slow
(
rp
,
flp
);
}
int
ip_route_output_
key
(
struct
rtable
**
rp
,
struct
flowi
*
flp
)
int
ip_route_output_
flow
(
struct
rtable
**
rp
,
struct
flowi
*
flp
,
struct
sock
*
sk
,
int
flags
)
{
int
err
;
if
((
err
=
__ip_route_output_key
(
rp
,
flp
))
!=
0
)
return
err
;
return
flp
->
proto
?
xfrm_lookup
((
struct
dst_entry
**
)
rp
,
flp
,
NULL
,
0
)
:
0
;
if
(
flp
->
proto
)
{
if
(
!
flp
->
fl4_src
)
flp
->
fl4_src
=
(
*
rp
)
->
rt_src
;
if
(
!
flp
->
fl4_dst
)
flp
->
fl4_dst
=
(
*
rp
)
->
rt_dst
;
return
xfrm_lookup
((
struct
dst_entry
**
)
rp
,
flp
,
sk
,
flags
);
}
return
0
;
}
int
ip_route_output_
flow
(
struct
rtable
**
rp
,
struct
flowi
*
flp
,
struct
sock
*
sk
,
int
flags
)
int
ip_route_output_
key
(
struct
rtable
**
rp
,
struct
flowi
*
flp
)
{
int
err
;
if
((
err
=
__ip_route_output_key
(
rp
,
flp
))
!=
0
)
return
err
;
return
flp
->
proto
?
xfrm_lookup
((
struct
dst_entry
**
)
rp
,
flp
,
sk
,
flags
)
:
0
;
return
ip_route_output_flow
(
rp
,
flp
,
NULL
,
0
);
}
static
int
rt_fill_info
(
struct
sk_buff
*
skb
,
u32
pid
,
u32
seq
,
int
event
,
...
...
net/xfrm/xfrm_policy.c
View file @
a35ed119
...
...
@@ -711,25 +711,11 @@ int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl,
{
struct
xfrm_policy
*
policy
;
struct
xfrm_state
*
xfrm
[
XFRM_MAX_DEPTH
];
struct
rtable
*
rt
=
(
struct
rtable
*
)
*
dst_p
;
struct
dst_entry
*
dst
;
struct
dst_entry
*
dst
,
*
dst_orig
=
*
dst_p
;
int
nx
=
0
;
int
err
;
u32
genid
;
u16
family
=
(
*
dst_p
)
->
ops
->
family
;
switch
(
family
)
{
case
AF_INET
:
if
(
!
fl
->
fl4_src
)
fl
->
fl4_src
=
rt
->
rt_src
;
if
(
!
fl
->
fl4_dst
)
fl
->
fl4_dst
=
rt
->
rt_dst
;
case
AF_INET6
:
/* Still not clear... */
default:
/* nothing */
;
}
u16
family
=
dst_orig
->
ops
->
family
;
restart:
genid
=
atomic_read
(
&
flow_cache_genid
);
policy
=
NULL
;
...
...
@@ -738,7 +724,7 @@ int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl,
if
(
!
policy
)
{
/* To accelerate a bit... */
if
((
rt
->
u
.
dst
.
flags
&
DST_NOXFRM
)
||
!
xfrm_policy_list
[
XFRM_POLICY_OUT
])
if
((
dst_orig
->
flags
&
DST_NOXFRM
)
||
!
xfrm_policy_list
[
XFRM_POLICY_OUT
])
return
0
;
policy
=
flow_cache_lookup
(
fl
,
family
,
...
...
@@ -813,7 +799,7 @@ int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl,
return
0
;
}
dst
=
&
rt
->
u
.
dst
;
dst
=
dst_orig
;
err
=
xfrm_bundle_create
(
policy
,
xfrm
,
nx
,
fl
,
&
dst
,
family
);
if
(
unlikely
(
err
))
{
...
...
@@ -843,12 +829,12 @@ int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl,
write_unlock_bh
(
&
policy
->
lock
);
}
*
dst_p
=
dst
;
ip_rt_put
(
rt
);
dst_release
(
dst_orig
);
xfrm_pol_put
(
policy
);
return
0
;
error:
ip_rt_put
(
rt
);
dst_release
(
dst_orig
);
xfrm_pol_put
(
policy
);
*
dst_p
=
NULL
;
return
err
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment