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
8ed80a16
Commit
8ed80a16
authored
Dec 05, 2002
by
Sridhar Samudrala
Committed by
Sridhar Samudrala
Dec 05, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SCTP] Register a notifier for v6 address additions/deletions.
parent
e8120ed0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
net/sctp/protocol.c
net/sctp/protocol.c
+14
-8
No files found.
net/sctp/protocol.c
View file @
8ed80a16
...
@@ -394,11 +394,11 @@ static sctp_scope_t sctp_v4_scope(union sctp_addr *addr)
...
@@ -394,11 +394,11 @@ static sctp_scope_t sctp_v4_scope(union sctp_addr *addr)
return
retval
;
return
retval
;
}
}
/* Event handler for inet
device
events.
/* Event handler for inet
address addition/deletion
events.
* Basically, whenever there is an event, we re-build our local address list.
* Basically, whenever there is an event, we re-build our local address list.
*/
*/
static
int
sctp_
netdev
_event
(
struct
notifier_block
*
this
,
unsigned
long
event
,
static
int
sctp_
inetaddr
_event
(
struct
notifier_block
*
this
,
unsigned
long
event
,
void
*
ptr
)
void
*
ptr
)
{
{
long
flags
__attribute__
((
unused
));
long
flags
__attribute__
((
unused
));
...
@@ -556,9 +556,9 @@ static struct sctp_pf sctp_pf_inet = {
...
@@ -556,9 +556,9 @@ static struct sctp_pf sctp_pf_inet = {
.
af
=
&
sctp_ipv4_specific
,
.
af
=
&
sctp_ipv4_specific
,
};
};
/*
Registration for netdev
events. */
/*
Notifier for inetaddr addition/deletion
events. */
struct
notifier_block
sctp_
netdev
_notifier
=
{
struct
notifier_block
sctp_
inetaddr
_notifier
=
{
.
notifier_call
=
sctp_
netdev
_event
,
.
notifier_call
=
sctp_
inetaddr
_event
,
};
};
/* Socket operations. */
/* Socket operations. */
...
@@ -785,7 +785,10 @@ int sctp_init(void)
...
@@ -785,7 +785,10 @@ int sctp_init(void)
INIT_LIST_HEAD
(
&
sctp_proto
.
local_addr_list
);
INIT_LIST_HEAD
(
&
sctp_proto
.
local_addr_list
);
sctp_proto
.
local_addr_lock
=
SPIN_LOCK_UNLOCKED
;
sctp_proto
.
local_addr_lock
=
SPIN_LOCK_UNLOCKED
;
register_inetaddr_notifier
(
&
sctp_netdev_notifier
);
/* Register notifiers for inet and inet6 address events. */
register_inetaddr_notifier
(
&
sctp_inetaddr_notifier
);
register_inet6addr_notifier
(
&
sctp_inetaddr_notifier
);
sctp_get_local_addr_list
(
&
sctp_proto
);
sctp_get_local_addr_list
(
&
sctp_proto
);
return
0
;
return
0
;
...
@@ -815,8 +818,11 @@ void sctp_exit(void)
...
@@ -815,8 +818,11 @@ void sctp_exit(void)
* up all the remaining associations and all that memory.
* up all the remaining associations and all that memory.
*/
*/
/* Unregister notifiers for inet and inet6 address events. */
unregister_inetaddr_notifier
(
&
sctp_inetaddr_notifier
);
unregister_inet6addr_notifier
(
&
sctp_inetaddr_notifier
);
/* Free the local address list. */
/* Free the local address list. */
unregister_inetaddr_notifier
(
&
sctp_netdev_notifier
);
sctp_free_local_addr_list
(
&
sctp_proto
);
sctp_free_local_addr_list
(
&
sctp_proto
);
/* Free the control endpoint. */
/* Free the control endpoint. */
...
...
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