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
8e5afcc7
Commit
8e5afcc7
authored
Jan 28, 2004
by
Hideaki Yoshifuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV6]: Use the cheaper ipv6_addr_any() for ipv6_addr_type() where possible.
parent
822d2c51
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
net/ipv6/af_inet6.c
net/ipv6/af_inet6.c
+1
-1
net/ipv6/ndisc.c
net/ipv6/ndisc.c
+1
-1
No files found.
net/ipv6/af_inet6.c
View file @
8e5afcc7
...
@@ -464,7 +464,7 @@ int inet6_getname(struct socket *sock, struct sockaddr *uaddr,
...
@@ -464,7 +464,7 @@ int inet6_getname(struct socket *sock, struct sockaddr *uaddr,
if
(
np
->
sndflow
)
if
(
np
->
sndflow
)
sin
->
sin6_flowinfo
=
np
->
flow_label
;
sin
->
sin6_flowinfo
=
np
->
flow_label
;
}
else
{
}
else
{
if
(
ipv6_addr_
type
(
&
np
->
rcv_saddr
)
==
IPV6_ADDR_ANY
)
if
(
ipv6_addr_
any
(
&
np
->
rcv_saddr
)
)
ipv6_addr_copy
(
&
sin
->
sin6_addr
,
&
np
->
saddr
);
ipv6_addr_copy
(
&
sin
->
sin6_addr
,
&
np
->
saddr
);
else
else
ipv6_addr_copy
(
&
sin
->
sin6_addr
,
&
np
->
rcv_saddr
);
ipv6_addr_copy
(
&
sin
->
sin6_addr
,
&
np
->
rcv_saddr
);
...
...
net/ipv6/ndisc.c
View file @
8e5afcc7
...
@@ -544,7 +544,7 @@ void ndisc_send_ns(struct net_device *dev, struct neighbour *neigh,
...
@@ -544,7 +544,7 @@ void ndisc_send_ns(struct net_device *dev, struct neighbour *neigh,
}
}
len
=
sizeof
(
struct
icmp6hdr
)
+
sizeof
(
struct
in6_addr
);
len
=
sizeof
(
struct
icmp6hdr
)
+
sizeof
(
struct
in6_addr
);
send_llinfo
=
dev
->
addr_len
&&
ipv6_addr_type
(
saddr
)
!=
IPV6_ADDR_ANY
;
send_llinfo
=
dev
->
addr_len
&&
!
ipv6_addr_any
(
saddr
)
;
if
(
send_llinfo
)
if
(
send_llinfo
)
len
+=
NDISC_OPT_SPACE
(
dev
->
addr_len
);
len
+=
NDISC_OPT_SPACE
(
dev
->
addr_len
);
...
...
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