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
1af32f0f
Commit
1af32f0f
authored
Dec 07, 2011
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'batman-adv/maint' of
git://git.open-mesh.org/linux-merge
parents
28d8ea2d
797399b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
5 deletions
+22
-5
net/batman-adv/translation-table.c
net/batman-adv/translation-table.c
+22
-5
No files found.
net/batman-adv/translation-table.c
View file @
1af32f0f
...
@@ -245,9 +245,11 @@ void tt_local_add(struct net_device *soft_iface, const uint8_t *addr,
...
@@ -245,9 +245,11 @@ void tt_local_add(struct net_device *soft_iface, const uint8_t *addr,
if
(
tt_global_entry
)
{
if
(
tt_global_entry
)
{
/* This node is probably going to update its tt table */
/* This node is probably going to update its tt table */
tt_global_entry
->
orig_node
->
tt_poss_change
=
true
;
tt_global_entry
->
orig_node
->
tt_poss_change
=
true
;
/* The global entry has to be marked as
PEND
ING and has to be
/* The global entry has to be marked as
ROAM
ING and has to be
* kept for consistency purpose */
* kept for consistency purpose */
tt_global_entry
->
flags
|=
TT_CLIENT_PENDING
;
tt_global_entry
->
flags
|=
TT_CLIENT_ROAM
;
tt_global_entry
->
roam_at
=
jiffies
;
send_roam_adv
(
bat_priv
,
tt_global_entry
->
addr
,
send_roam_adv
(
bat_priv
,
tt_global_entry
->
addr
,
tt_global_entry
->
orig_node
);
tt_global_entry
->
orig_node
);
}
}
...
@@ -694,6 +696,7 @@ void tt_global_del(struct bat_priv *bat_priv,
...
@@ -694,6 +696,7 @@ void tt_global_del(struct bat_priv *bat_priv,
const
char
*
message
,
bool
roaming
)
const
char
*
message
,
bool
roaming
)
{
{
struct
tt_global_entry
*
tt_global_entry
=
NULL
;
struct
tt_global_entry
*
tt_global_entry
=
NULL
;
struct
tt_local_entry
*
tt_local_entry
=
NULL
;
tt_global_entry
=
tt_global_hash_find
(
bat_priv
,
addr
);
tt_global_entry
=
tt_global_hash_find
(
bat_priv
,
addr
);
if
(
!
tt_global_entry
)
if
(
!
tt_global_entry
)
...
@@ -701,15 +704,29 @@ void tt_global_del(struct bat_priv *bat_priv,
...
@@ -701,15 +704,29 @@ void tt_global_del(struct bat_priv *bat_priv,
if
(
tt_global_entry
->
orig_node
==
orig_node
)
{
if
(
tt_global_entry
->
orig_node
==
orig_node
)
{
if
(
roaming
)
{
if
(
roaming
)
{
tt_global_entry
->
flags
|=
TT_CLIENT_ROAM
;
/* if we are deleting a global entry due to a roam
tt_global_entry
->
roam_at
=
jiffies
;
* event, there are two possibilities:
goto
out
;
* 1) the client roamed from node A to node B => we mark
* it with TT_CLIENT_ROAM, we start a timer and we
* wait for node B to claim it. In case of timeout
* the entry is purged.
* 2) the client roamed to us => we can directly delete
* the global entry, since it is useless now. */
tt_local_entry
=
tt_local_hash_find
(
bat_priv
,
tt_global_entry
->
addr
);
if
(
!
tt_local_entry
)
{
tt_global_entry
->
flags
|=
TT_CLIENT_ROAM
;
tt_global_entry
->
roam_at
=
jiffies
;
goto
out
;
}
}
}
_tt_global_del
(
bat_priv
,
tt_global_entry
,
message
);
_tt_global_del
(
bat_priv
,
tt_global_entry
,
message
);
}
}
out:
out:
if
(
tt_global_entry
)
if
(
tt_global_entry
)
tt_global_entry_free_ref
(
tt_global_entry
);
tt_global_entry_free_ref
(
tt_global_entry
);
if
(
tt_local_entry
)
tt_local_entry_free_ref
(
tt_local_entry
);
}
}
void
tt_global_del_orig
(
struct
bat_priv
*
bat_priv
,
void
tt_global_del_orig
(
struct
bat_priv
*
bat_priv
,
...
...
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