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
6b26ab23
Commit
6b26ab23
authored
Oct 25, 2004
by
Suresh Krishnan
Committed by
David S. Miller
Oct 25, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Address family not supported for sendmsg()
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
e3e9425c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
net/ipv4/raw.c
net/ipv4/raw.c
+1
-1
net/ipv4/udp.c
net/ipv4/udp.c
+1
-1
net/ipv6/raw.c
net/ipv6/raw.c
+1
-1
net/ipv6/udp.c
net/ipv6/udp.c
+1
-1
No files found.
net/ipv4/raw.c
View file @
6b26ab23
...
@@ -407,7 +407,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
...
@@ -407,7 +407,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
printk
(
KERN_INFO
"%s forgot to set AF_INET in "
printk
(
KERN_INFO
"%s forgot to set AF_INET in "
"raw sendmsg. Fix it!
\n
"
,
"raw sendmsg. Fix it!
\n
"
,
current
->
comm
);
current
->
comm
);
err
=
-
E
INVAL
;
err
=
-
E
AFNOSUPPORT
;
if
(
usin
->
sin_family
)
if
(
usin
->
sin_family
)
goto
out
;
goto
out
;
}
}
...
...
net/ipv4/udp.c
View file @
6b26ab23
...
@@ -531,7 +531,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
...
@@ -531,7 +531,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
return
-
EINVAL
;
return
-
EINVAL
;
if
(
usin
->
sin_family
!=
AF_INET
)
{
if
(
usin
->
sin_family
!=
AF_INET
)
{
if
(
usin
->
sin_family
!=
AF_UNSPEC
)
if
(
usin
->
sin_family
!=
AF_UNSPEC
)
return
-
E
INVAL
;
return
-
E
AFNOSUPPORT
;
}
}
daddr
=
usin
->
sin_addr
.
s_addr
;
daddr
=
usin
->
sin_addr
.
s_addr
;
...
...
net/ipv6/raw.c
View file @
6b26ab23
...
@@ -639,7 +639,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
...
@@ -639,7 +639,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
return
-
EINVAL
;
return
-
EINVAL
;
if
(
sin6
->
sin6_family
&&
sin6
->
sin6_family
!=
AF_INET6
)
if
(
sin6
->
sin6_family
&&
sin6
->
sin6_family
!=
AF_INET6
)
return
(
-
E
INVAL
);
return
(
-
E
AFNOSUPPORT
);
/* port is the proto value [0..255] carried in nexthdr */
/* port is the proto value [0..255] carried in nexthdr */
proto
=
ntohs
(
sin6
->
sin6_port
);
proto
=
ntohs
(
sin6
->
sin6_port
);
...
...
net/ipv6/udp.c
View file @
6b26ab23
...
@@ -699,7 +699,7 @@ static int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk,
...
@@ -699,7 +699,7 @@ static int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk,
if
(
likely
(
up
->
pending
))
{
if
(
likely
(
up
->
pending
))
{
if
(
unlikely
(
up
->
pending
!=
AF_INET6
))
{
if
(
unlikely
(
up
->
pending
!=
AF_INET6
))
{
release_sock
(
sk
);
release_sock
(
sk
);
return
-
E
INVAL
;
return
-
E
AFNOSUPPORT
;
}
}
dst
=
NULL
;
dst
=
NULL
;
goto
do_append_data
;
goto
do_append_data
;
...
...
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