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
nexedi
linux
Commits
3ac3019b
Commit
3ac3019b
authored
Jan 15, 2004
by
Sridhar Samudrala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SCTP] Fix bugs in byte order conversion while processing address
related SCTP socket options.
parent
6dcd38ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
net/sctp/socket.c
net/sctp/socket.c
+9
-1
No files found.
net/sctp/socket.c
View file @
3ac3019b
...
@@ -152,10 +152,14 @@ struct sctp_transport *sctp_addr_id2transport(struct sock *sk,
...
@@ -152,10 +152,14 @@ struct sctp_transport *sctp_addr_id2transport(struct sock *sk,
{
{
struct
sctp_association
*
addr_asoc
=
NULL
,
*
id_asoc
=
NULL
;
struct
sctp_association
*
addr_asoc
=
NULL
,
*
id_asoc
=
NULL
;
struct
sctp_transport
*
transport
;
struct
sctp_transport
*
transport
;
union
sctp_addr
*
laddr
=
(
union
sctp_addr
*
)
addr
;
laddr
->
v4
.
sin_port
=
ntohs
(
laddr
->
v4
.
sin_port
);
addr_asoc
=
sctp_endpoint_lookup_assoc
(
sctp_sk
(
sk
)
->
ep
,
addr_asoc
=
sctp_endpoint_lookup_assoc
(
sctp_sk
(
sk
)
->
ep
,
(
union
sctp_addr
*
)
addr
,
(
union
sctp_addr
*
)
addr
,
&
transport
);
&
transport
);
laddr
->
v4
.
sin_port
=
htons
(
laddr
->
v4
.
sin_port
);
if
(
!
addr_asoc
)
if
(
!
addr_asoc
)
return
NULL
;
return
NULL
;
...
@@ -3008,9 +3012,13 @@ static int sctp_getsockopt_primary_addr(struct sock *sk, int len,
...
@@ -3008,9 +3012,13 @@ static int sctp_getsockopt_primary_addr(struct sock *sk, int len,
if
(
!
asoc
->
peer
.
primary_path
)
if
(
!
asoc
->
peer
.
primary_path
)
return
-
ENOTCONN
;
return
-
ENOTCONN
;
asoc
->
peer
.
primary_path
->
ipaddr
.
v4
.
sin_port
=
htons
(
asoc
->
peer
.
primary_path
->
ipaddr
.
v4
.
sin_port
);
memcpy
(
&
prim
.
ssp_addr
,
&
asoc
->
peer
.
primary_path
->
ipaddr
,
memcpy
(
&
prim
.
ssp_addr
,
&
asoc
->
peer
.
primary_path
->
ipaddr
,
sizeof
(
union
sctp_addr
));
sizeof
(
union
sctp_addr
));
asoc
->
peer
.
primary_path
->
ipaddr
.
v4
.
sin_port
=
ntohs
(
asoc
->
peer
.
primary_path
->
ipaddr
.
v4
.
sin_port
);
sctp_get_pf_specific
(
sk
->
sk_family
)
->
addr_v4map
(
sp
,
sctp_get_pf_specific
(
sk
->
sk_family
)
->
addr_v4map
(
sp
,
(
union
sctp_addr
*
)
&
prim
.
ssp_addr
);
(
union
sctp_addr
*
)
&
prim
.
ssp_addr
);
...
...
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