Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
d7aabf22
Commit
d7aabf22
authored
Apr 10, 2008
by
YOSHIFUJI Hideaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV6]: Use in6addr_any where appropriate.
Signed-off-by:
YOSHIFUJI Hideaki
<
yoshfuji@linux-ipv6.org
>
parent
f3ee4010
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
net/ipv6/addrconf.c
net/ipv6/addrconf.c
+1
-3
net/ipv6/mcast.c
net/ipv6/mcast.c
+11
-8
No files found.
net/ipv6/addrconf.c
View file @
d7aabf22
...
@@ -2745,7 +2745,6 @@ static void addrconf_dad_timer(unsigned long data)
...
@@ -2745,7 +2745,6 @@ static void addrconf_dad_timer(unsigned long data)
{
{
struct
inet6_ifaddr
*
ifp
=
(
struct
inet6_ifaddr
*
)
data
;
struct
inet6_ifaddr
*
ifp
=
(
struct
inet6_ifaddr
*
)
data
;
struct
inet6_dev
*
idev
=
ifp
->
idev
;
struct
inet6_dev
*
idev
=
ifp
->
idev
;
struct
in6_addr
unspec
;
struct
in6_addr
mcaddr
;
struct
in6_addr
mcaddr
;
read_lock_bh
(
&
idev
->
lock
);
read_lock_bh
(
&
idev
->
lock
);
...
@@ -2774,9 +2773,8 @@ static void addrconf_dad_timer(unsigned long data)
...
@@ -2774,9 +2773,8 @@ static void addrconf_dad_timer(unsigned long data)
read_unlock_bh
(
&
idev
->
lock
);
read_unlock_bh
(
&
idev
->
lock
);
/* send a neighbour solicitation for our addr */
/* send a neighbour solicitation for our addr */
memset
(
&
unspec
,
0
,
sizeof
(
unspec
));
addrconf_addr_solict_mult
(
&
ifp
->
addr
,
&
mcaddr
);
addrconf_addr_solict_mult
(
&
ifp
->
addr
,
&
mcaddr
);
ndisc_send_ns
(
ifp
->
idev
->
dev
,
NULL
,
&
ifp
->
addr
,
&
mcaddr
,
&
unspec
);
ndisc_send_ns
(
ifp
->
idev
->
dev
,
NULL
,
&
ifp
->
addr
,
&
mcaddr
,
&
in6addr_any
);
out:
out:
in6_ifa_put
(
ifp
);
in6_ifa_put
(
ifp
);
}
}
...
...
net/ipv6/mcast.c
View file @
d7aabf22
...
@@ -1404,6 +1404,7 @@ static struct sk_buff *mld_newpack(struct net_device *dev, int size)
...
@@ -1404,6 +1404,7 @@ static struct sk_buff *mld_newpack(struct net_device *dev, int size)
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
struct
mld2_report
*
pmr
;
struct
mld2_report
*
pmr
;
struct
in6_addr
addr_buf
;
struct
in6_addr
addr_buf
;
const
struct
in6_addr
*
saddr
;
int
err
;
int
err
;
u8
ra
[
8
]
=
{
IPPROTO_ICMPV6
,
0
,
u8
ra
[
8
]
=
{
IPPROTO_ICMPV6
,
0
,
IPV6_TLV_ROUTERALERT
,
2
,
0
,
0
,
IPV6_TLV_ROUTERALERT
,
2
,
0
,
0
,
...
@@ -1422,10 +1423,11 @@ static struct sk_buff *mld_newpack(struct net_device *dev, int size)
...
@@ -1422,10 +1423,11 @@ static struct sk_buff *mld_newpack(struct net_device *dev, int size)
* use unspecified address as the source address
* use unspecified address as the source address
* when a valid link-local address is not available.
* when a valid link-local address is not available.
*/
*/
memset
(
&
addr_buf
,
0
,
sizeof
(
addr_buf
));
saddr
=
&
in6addr_any
;
}
}
else
saddr
=
&
addr_buf
;
ip6_nd_hdr
(
sk
,
skb
,
dev
,
&
addr_buf
,
&
mld2_all_mcr
,
NEXTHDR_HOP
,
0
);
ip6_nd_hdr
(
sk
,
skb
,
dev
,
saddr
,
&
mld2_all_mcr
,
NEXTHDR_HOP
,
0
);
memcpy
(
skb_put
(
skb
,
sizeof
(
ra
)),
ra
,
sizeof
(
ra
));
memcpy
(
skb_put
(
skb
,
sizeof
(
ra
)),
ra
,
sizeof
(
ra
));
...
@@ -1766,7 +1768,7 @@ static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type)
...
@@ -1766,7 +1768,7 @@ static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type)
struct
inet6_dev
*
idev
;
struct
inet6_dev
*
idev
;
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
struct
icmp6hdr
*
hdr
;
struct
icmp6hdr
*
hdr
;
const
struct
in6_addr
*
snd_addr
;
const
struct
in6_addr
*
snd_addr
,
*
saddr
;
struct
in6_addr
*
addrp
;
struct
in6_addr
*
addrp
;
struct
in6_addr
addr_buf
;
struct
in6_addr
addr_buf
;
int
err
,
len
,
payload_len
,
full_len
;
int
err
,
len
,
payload_len
,
full_len
;
...
@@ -1805,10 +1807,11 @@ static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type)
...
@@ -1805,10 +1807,11 @@ static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type)
* use unspecified address as the source address
* use unspecified address as the source address
* when a valid link-local address is not available.
* when a valid link-local address is not available.
*/
*/
memset
(
&
addr_buf
,
0
,
sizeof
(
addr_buf
));
saddr
=
&
in6addr_any
;
}
}
else
saddr
=
&
addr_buf
;
ip6_nd_hdr
(
sk
,
skb
,
dev
,
&
addr_buf
,
snd_addr
,
NEXTHDR_HOP
,
payload_len
);
ip6_nd_hdr
(
sk
,
skb
,
dev
,
saddr
,
snd_addr
,
NEXTHDR_HOP
,
payload_len
);
memcpy
(
skb_put
(
skb
,
sizeof
(
ra
)),
ra
,
sizeof
(
ra
));
memcpy
(
skb_put
(
skb
,
sizeof
(
ra
)),
ra
,
sizeof
(
ra
));
...
@@ -1819,7 +1822,7 @@ static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type)
...
@@ -1819,7 +1822,7 @@ static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type)
addrp
=
(
struct
in6_addr
*
)
skb_put
(
skb
,
sizeof
(
struct
in6_addr
));
addrp
=
(
struct
in6_addr
*
)
skb_put
(
skb
,
sizeof
(
struct
in6_addr
));
ipv6_addr_copy
(
addrp
,
addr
);
ipv6_addr_copy
(
addrp
,
addr
);
hdr
->
icmp6_cksum
=
csum_ipv6_magic
(
&
addr_buf
,
snd_addr
,
len
,
hdr
->
icmp6_cksum
=
csum_ipv6_magic
(
saddr
,
snd_addr
,
len
,
IPPROTO_ICMPV6
,
IPPROTO_ICMPV6
,
csum_partial
((
__u8
*
)
hdr
,
len
,
0
));
csum_partial
((
__u8
*
)
hdr
,
len
,
0
));
...
...
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