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
b16f3385
Commit
b16f3385
authored
Nov 10, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://bk.skbuff.net:20610/linux-2.6-inet6-misc/
into nuts.davemloft.net:/disk1/BK/net-2.6
parents
909ef487
ded931b0
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
103 additions
and
84 deletions
+103
-84
include/net/ipv6.h
include/net/ipv6.h
+9
-0
include/net/tcp.h
include/net/tcp.h
+11
-5
net/ipv4/tcp_timer.c
net/ipv4/tcp_timer.c
+6
-1
net/ipv6/addrconf.c
net/ipv6/addrconf.c
+5
-5
net/ipv6/anycast.c
net/ipv6/anycast.c
+5
-5
net/ipv6/datagram.c
net/ipv6/datagram.c
+1
-1
net/ipv6/ip6_fib.c
net/ipv6/ip6_fib.c
+2
-2
net/ipv6/ip6_flowlabel.c
net/ipv6/ip6_flowlabel.c
+1
-1
net/ipv6/ip6_output.c
net/ipv6/ip6_output.c
+2
-2
net/ipv6/ip6_tunnel.c
net/ipv6/ip6_tunnel.c
+5
-5
net/ipv6/mcast.c
net/ipv6/mcast.c
+18
-19
net/ipv6/ndisc.c
net/ipv6/ndisc.c
+1
-1
net/ipv6/netfilter/ip6_queue.c
net/ipv6/netfilter/ip6_queue.c
+2
-2
net/ipv6/netfilter/ip6t_rt.c
net/ipv6/netfilter/ip6t_rt.c
+2
-2
net/ipv6/raw.c
net/ipv6/raw.c
+4
-4
net/ipv6/reassembly.c
net/ipv6/reassembly.c
+4
-4
net/ipv6/route.c
net/ipv6/route.c
+4
-4
net/ipv6/tcp_ipv6.c
net/ipv6/tcp_ipv6.c
+8
-8
net/ipv6/udp.c
net/ipv6/udp.c
+6
-6
net/ipv6/xfrm6_policy.c
net/ipv6/xfrm6_policy.c
+3
-3
net/ipv6/xfrm6_state.c
net/ipv6/xfrm6_state.c
+3
-3
net/sctp/ipv6.c
net/sctp/ipv6.c
+1
-1
No files found.
include/net/ipv6.h
View file @
b16f3385
...
@@ -296,6 +296,15 @@ static inline void ipv6_addr_set(struct in6_addr *addr,
...
@@ -296,6 +296,15 @@ static inline void ipv6_addr_set(struct in6_addr *addr,
}
}
#endif
#endif
static
inline
int
ipv6_addr_equal
(
const
struct
in6_addr
*
a1
,
const
struct
in6_addr
*
a2
)
{
return
(
a1
->
s6_addr32
[
0
]
==
a2
->
s6_addr32
[
0
]
&&
a1
->
s6_addr32
[
1
]
==
a2
->
s6_addr32
[
1
]
&&
a1
->
s6_addr32
[
2
]
==
a2
->
s6_addr32
[
2
]
&&
a1
->
s6_addr32
[
3
]
==
a2
->
s6_addr32
[
3
]);
}
static
inline
int
ipv6_addr_any
(
const
struct
in6_addr
*
a
)
static
inline
int
ipv6_addr_any
(
const
struct
in6_addr
*
a
)
{
{
return
((
a
->
s6_addr32
[
0
]
|
a
->
s6_addr32
[
1
]
|
return
((
a
->
s6_addr32
[
0
]
|
a
->
s6_addr32
[
1
]
|
...
...
include/net/tcp.h
View file @
b16f3385
...
@@ -361,8 +361,8 @@ extern void tcp_tw_deschedule(struct tcp_tw_bucket *tw);
...
@@ -361,8 +361,8 @@ extern void tcp_tw_deschedule(struct tcp_tw_bucket *tw);
#define TCP_IPV6_MATCH(__sk, __saddr, __daddr, __ports, __dif) \
#define TCP_IPV6_MATCH(__sk, __saddr, __daddr, __ports, __dif) \
(((*((__u32 *)&(inet_sk(__sk)->dport)))== (__ports)) && \
(((*((__u32 *)&(inet_sk(__sk)->dport)))== (__ports)) && \
((__sk)->sk_family == AF_INET6) && \
((__sk)->sk_family == AF_INET6) && \
!ipv6_addr_cmp
(&inet6_sk(__sk)->daddr, (__saddr)) && \
ipv6_addr_equal
(&inet6_sk(__sk)->daddr, (__saddr)) && \
!ipv6_addr_cmp
(&inet6_sk(__sk)->rcv_saddr, (__daddr)) && \
ipv6_addr_equal
(&inet6_sk(__sk)->rcv_saddr, (__daddr)) && \
(!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
(!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
/* These can have wildcards, don't try too hard. */
/* These can have wildcards, don't try too hard. */
...
@@ -965,7 +965,9 @@ extern void tcp_reset_keepalive_timer(struct sock *, unsigned long);
...
@@ -965,7 +965,9 @@ extern void tcp_reset_keepalive_timer(struct sock *, unsigned long);
extern
unsigned
int
tcp_sync_mss
(
struct
sock
*
sk
,
u32
pmtu
);
extern
unsigned
int
tcp_sync_mss
(
struct
sock
*
sk
,
u32
pmtu
);
extern
unsigned
int
tcp_current_mss
(
struct
sock
*
sk
,
int
large
);
extern
unsigned
int
tcp_current_mss
(
struct
sock
*
sk
,
int
large
);
extern
const
char
timer_bug_msg
[];
#ifdef TCP_DEBUG
extern
const
char
tcp_timer_bug_msg
[];
#endif
/* tcp_diag.c */
/* tcp_diag.c */
extern
void
tcp_get_info
(
struct
sock
*
,
struct
tcp_info
*
);
extern
void
tcp_get_info
(
struct
sock
*
,
struct
tcp_info
*
);
...
@@ -998,7 +1000,9 @@ static inline void tcp_clear_xmit_timer(struct sock *sk, int what)
...
@@ -998,7 +1000,9 @@ static inline void tcp_clear_xmit_timer(struct sock *sk, int what)
#endif
#endif
break
;
break
;
default:
default:
printk
(
timer_bug_msg
);
#ifdef TCP_DEBUG
printk
(
tcp_timer_bug_msg
);
#endif
return
;
return
;
};
};
...
@@ -1033,7 +1037,9 @@ static inline void tcp_reset_xmit_timer(struct sock *sk, int what, unsigned long
...
@@ -1033,7 +1037,9 @@ static inline void tcp_reset_xmit_timer(struct sock *sk, int what, unsigned long
break
;
break
;
default:
default:
printk
(
timer_bug_msg
);
#ifdef TCP_DEBUG
printk
(
tcp_timer_bug_msg
);
#endif
};
};
}
}
...
...
net/ipv4/tcp_timer.c
View file @
b16f3385
...
@@ -36,7 +36,9 @@ static void tcp_write_timer(unsigned long);
...
@@ -36,7 +36,9 @@ static void tcp_write_timer(unsigned long);
static
void
tcp_delack_timer
(
unsigned
long
);
static
void
tcp_delack_timer
(
unsigned
long
);
static
void
tcp_keepalive_timer
(
unsigned
long
data
);
static
void
tcp_keepalive_timer
(
unsigned
long
data
);
const
char
timer_bug_msg
[]
=
KERN_DEBUG
"tcpbug: unknown timer value
\n
"
;
#ifdef TCP_DEBUG
const
char
tcp_timer_bug_msg
[]
=
KERN_DEBUG
"tcpbug: unknown timer value
\n
"
;
#endif
/*
/*
* Using different timers for retransmit, delayed acks and probes
* Using different timers for retransmit, delayed acks and probes
...
@@ -651,3 +653,6 @@ EXPORT_SYMBOL(tcp_clear_xmit_timers);
...
@@ -651,3 +653,6 @@ EXPORT_SYMBOL(tcp_clear_xmit_timers);
EXPORT_SYMBOL
(
tcp_delete_keepalive_timer
);
EXPORT_SYMBOL
(
tcp_delete_keepalive_timer
);
EXPORT_SYMBOL
(
tcp_init_xmit_timers
);
EXPORT_SYMBOL
(
tcp_init_xmit_timers
);
EXPORT_SYMBOL
(
tcp_reset_keepalive_timer
);
EXPORT_SYMBOL
(
tcp_reset_keepalive_timer
);
#ifdef TCP_DEBUG
EXPORT_SYMBOL
(
tcp_timer_bug_msg
);
#endif
net/ipv6/addrconf.c
View file @
b16f3385
...
@@ -921,7 +921,7 @@ int ipv6_chk_addr(struct in6_addr *addr, struct net_device *dev, int strict)
...
@@ -921,7 +921,7 @@ int ipv6_chk_addr(struct in6_addr *addr, struct net_device *dev, int strict)
read_lock_bh
(
&
addrconf_hash_lock
);
read_lock_bh
(
&
addrconf_hash_lock
);
for
(
ifp
=
inet6_addr_lst
[
hash
];
ifp
;
ifp
=
ifp
->
lst_next
)
{
for
(
ifp
=
inet6_addr_lst
[
hash
];
ifp
;
ifp
=
ifp
->
lst_next
)
{
if
(
ipv6_addr_
cmp
(
&
ifp
->
addr
,
addr
)
==
0
&&
if
(
ipv6_addr_
equal
(
&
ifp
->
addr
,
addr
)
&&
!
(
ifp
->
flags
&
IFA_F_TENTATIVE
))
{
!
(
ifp
->
flags
&
IFA_F_TENTATIVE
))
{
if
(
dev
==
NULL
||
ifp
->
idev
->
dev
==
dev
||
if
(
dev
==
NULL
||
ifp
->
idev
->
dev
==
dev
||
!
(
ifp
->
scope
&
(
IFA_LINK
|
IFA_HOST
)
||
strict
))
!
(
ifp
->
scope
&
(
IFA_LINK
|
IFA_HOST
)
||
strict
))
...
@@ -940,7 +940,7 @@ int ipv6_chk_same_addr(const struct in6_addr *addr, struct net_device *dev)
...
@@ -940,7 +940,7 @@ int ipv6_chk_same_addr(const struct in6_addr *addr, struct net_device *dev)
read_lock_bh
(
&
addrconf_hash_lock
);
read_lock_bh
(
&
addrconf_hash_lock
);
for
(
ifp
=
inet6_addr_lst
[
hash
];
ifp
;
ifp
=
ifp
->
lst_next
)
{
for
(
ifp
=
inet6_addr_lst
[
hash
];
ifp
;
ifp
=
ifp
->
lst_next
)
{
if
(
ipv6_addr_
cmp
(
&
ifp
->
addr
,
addr
)
==
0
)
{
if
(
ipv6_addr_
equal
(
&
ifp
->
addr
,
addr
)
)
{
if
(
dev
==
NULL
||
ifp
->
idev
->
dev
==
dev
)
if
(
dev
==
NULL
||
ifp
->
idev
->
dev
==
dev
)
break
;
break
;
}
}
...
@@ -956,7 +956,7 @@ struct inet6_ifaddr * ipv6_get_ifaddr(struct in6_addr *addr, struct net_device *
...
@@ -956,7 +956,7 @@ struct inet6_ifaddr * ipv6_get_ifaddr(struct in6_addr *addr, struct net_device *
read_lock_bh
(
&
addrconf_hash_lock
);
read_lock_bh
(
&
addrconf_hash_lock
);
for
(
ifp
=
inet6_addr_lst
[
hash
];
ifp
;
ifp
=
ifp
->
lst_next
)
{
for
(
ifp
=
inet6_addr_lst
[
hash
];
ifp
;
ifp
=
ifp
->
lst_next
)
{
if
(
ipv6_addr_
cmp
(
&
ifp
->
addr
,
addr
)
==
0
)
{
if
(
ipv6_addr_
equal
(
&
ifp
->
addr
,
addr
)
)
{
if
(
dev
==
NULL
||
ifp
->
idev
->
dev
==
dev
||
if
(
dev
==
NULL
||
ifp
->
idev
->
dev
==
dev
||
!
(
ifp
->
scope
&
(
IFA_LINK
|
IFA_HOST
)
||
strict
))
{
!
(
ifp
->
scope
&
(
IFA_LINK
|
IFA_HOST
)
||
strict
))
{
in6_ifa_hold
(
ifp
);
in6_ifa_hold
(
ifp
);
...
@@ -992,7 +992,7 @@ int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2)
...
@@ -992,7 +992,7 @@ int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2)
return
1
;
return
1
;
if
(
sk2_rcv_saddr6
&&
if
(
sk2_rcv_saddr6
&&
!
ipv6_addr_cmp
(
sk_rcv_saddr6
,
sk2_rcv_saddr6
))
ipv6_addr_equal
(
sk_rcv_saddr6
,
sk2_rcv_saddr6
))
return
1
;
return
1
;
if
(
addr_type
==
IPV6_ADDR_MAPPED
&&
if
(
addr_type
==
IPV6_ADDR_MAPPED
&&
...
@@ -1630,7 +1630,7 @@ static int inet6_addr_del(int ifindex, struct in6_addr *pfx, int plen)
...
@@ -1630,7 +1630,7 @@ static int inet6_addr_del(int ifindex, struct in6_addr *pfx, int plen)
read_lock_bh
(
&
idev
->
lock
);
read_lock_bh
(
&
idev
->
lock
);
for
(
ifp
=
idev
->
addr_list
;
ifp
;
ifp
=
ifp
->
if_next
)
{
for
(
ifp
=
idev
->
addr_list
;
ifp
;
ifp
=
ifp
->
if_next
)
{
if
(
ifp
->
prefix_len
==
plen
&&
if
(
ifp
->
prefix_len
==
plen
&&
(
!
memcmp
(
pfx
,
&
ifp
->
addr
,
sizeof
(
struct
in6_addr
))
))
{
ipv6_addr_equal
(
pfx
,
&
ifp
->
addr
))
{
in6_ifa_hold
(
ifp
);
in6_ifa_hold
(
ifp
);
read_unlock_bh
(
&
idev
->
lock
);
read_unlock_bh
(
&
idev
->
lock
);
...
...
net/ipv6/anycast.c
View file @
b16f3385
...
@@ -205,7 +205,7 @@ int ipv6_sock_ac_drop(struct sock *sk, int ifindex, struct in6_addr *addr)
...
@@ -205,7 +205,7 @@ int ipv6_sock_ac_drop(struct sock *sk, int ifindex, struct in6_addr *addr)
prev_pac
=
NULL
;
prev_pac
=
NULL
;
for
(
pac
=
np
->
ipv6_ac_list
;
pac
;
pac
=
pac
->
acl_next
)
{
for
(
pac
=
np
->
ipv6_ac_list
;
pac
;
pac
=
pac
->
acl_next
)
{
if
((
ifindex
==
0
||
pac
->
acl_ifindex
==
ifindex
)
&&
if
((
ifindex
==
0
||
pac
->
acl_ifindex
==
ifindex
)
&&
ipv6_addr_
cmp
(
&
pac
->
acl_addr
,
addr
)
==
0
)
ipv6_addr_
equal
(
&
pac
->
acl_addr
,
addr
)
)
break
;
break
;
prev_pac
=
pac
;
prev_pac
=
pac
;
}
}
...
@@ -278,7 +278,7 @@ int inet6_ac_check(struct sock *sk, struct in6_addr *addr, int ifindex)
...
@@ -278,7 +278,7 @@ int inet6_ac_check(struct sock *sk, struct in6_addr *addr, int ifindex)
for (pac=np->ipv6_ac_list; pac; pac=pac->acl_next) {
for (pac=np->ipv6_ac_list; pac; pac=pac->acl_next) {
if (ifindex && pac->acl_ifindex != ifindex)
if (ifindex && pac->acl_ifindex != ifindex)
continue;
continue;
found = ipv6_addr_
cmp(&pac->acl_addr, addr) == 0
;
found = ipv6_addr_
equal(&pac->acl_addr, addr)
;
if (found)
if (found)
break;
break;
}
}
...
@@ -320,7 +320,7 @@ int ipv6_dev_ac_inc(struct net_device *dev, struct in6_addr *addr)
...
@@ -320,7 +320,7 @@ int ipv6_dev_ac_inc(struct net_device *dev, struct in6_addr *addr)
}
}
for
(
aca
=
idev
->
ac_list
;
aca
;
aca
=
aca
->
aca_next
)
{
for
(
aca
=
idev
->
ac_list
;
aca
;
aca
=
aca
->
aca_next
)
{
if
(
ipv6_addr_
cmp
(
&
aca
->
aca_addr
,
addr
)
==
0
)
{
if
(
ipv6_addr_
equal
(
&
aca
->
aca_addr
,
addr
)
)
{
aca
->
aca_users
++
;
aca
->
aca_users
++
;
err
=
0
;
err
=
0
;
goto
out
;
goto
out
;
...
@@ -384,7 +384,7 @@ int __ipv6_dev_ac_dec(struct inet6_dev *idev, struct in6_addr *addr)
...
@@ -384,7 +384,7 @@ int __ipv6_dev_ac_dec(struct inet6_dev *idev, struct in6_addr *addr)
write_lock_bh
(
&
idev
->
lock
);
write_lock_bh
(
&
idev
->
lock
);
prev_aca
=
NULL
;
prev_aca
=
NULL
;
for
(
aca
=
idev
->
ac_list
;
aca
;
aca
=
aca
->
aca_next
)
{
for
(
aca
=
idev
->
ac_list
;
aca
;
aca
=
aca
->
aca_next
)
{
if
(
ipv6_addr_
cmp
(
&
aca
->
aca_addr
,
addr
)
==
0
)
if
(
ipv6_addr_
equal
(
&
aca
->
aca_addr
,
addr
)
)
break
;
break
;
prev_aca
=
aca
;
prev_aca
=
aca
;
}
}
...
@@ -436,7 +436,7 @@ static int ipv6_chk_acast_dev(struct net_device *dev, struct in6_addr *addr)
...
@@ -436,7 +436,7 @@ static int ipv6_chk_acast_dev(struct net_device *dev, struct in6_addr *addr)
if
(
idev
)
{
if
(
idev
)
{
read_lock_bh
(
&
idev
->
lock
);
read_lock_bh
(
&
idev
->
lock
);
for
(
aca
=
idev
->
ac_list
;
aca
;
aca
=
aca
->
aca_next
)
for
(
aca
=
idev
->
ac_list
;
aca
;
aca
=
aca
->
aca_next
)
if
(
ipv6_addr_
cmp
(
&
aca
->
aca_addr
,
addr
)
==
0
)
if
(
ipv6_addr_
equal
(
&
aca
->
aca_addr
,
addr
)
)
break
;
break
;
read_unlock_bh
(
&
idev
->
lock
);
read_unlock_bh
(
&
idev
->
lock
);
in6_dev_put
(
idev
);
in6_dev_put
(
idev
);
...
...
net/ipv6/datagram.c
View file @
b16f3385
...
@@ -190,7 +190,7 @@ int ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
...
@@ -190,7 +190,7 @@ int ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
}
}
ip6_dst_store
(
sk
,
dst
,
ip6_dst_store
(
sk
,
dst
,
!
ipv6_addr_cmp
(
&
fl
.
fl6_dst
,
&
np
->
daddr
)
?
ipv6_addr_equal
(
&
fl
.
fl6_dst
,
&
np
->
daddr
)
?
&
np
->
daddr
:
NULL
);
&
np
->
daddr
:
NULL
);
sk
->
sk_state
=
TCP_ESTABLISHED
;
sk
->
sk_state
=
TCP_ESTABLISHED
;
...
...
net/ipv6/ip6_fib.c
View file @
b16f3385
...
@@ -451,8 +451,8 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt,
...
@@ -451,8 +451,8 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt,
if
(
iter
->
rt6i_dev
==
rt
->
rt6i_dev
&&
if
(
iter
->
rt6i_dev
==
rt
->
rt6i_dev
&&
iter
->
rt6i_idev
==
rt
->
rt6i_idev
&&
iter
->
rt6i_idev
==
rt
->
rt6i_idev
&&
ipv6_addr_
cmp
(
&
iter
->
rt6i_gateway
,
ipv6_addr_
equal
(
&
iter
->
rt6i_gateway
,
&
rt
->
rt6i_gateway
)
==
0
)
{
&
rt
->
rt6i_gateway
)
)
{
if
(
!
(
iter
->
rt6i_flags
&
RTF_EXPIRES
))
if
(
!
(
iter
->
rt6i_flags
&
RTF_EXPIRES
))
return
-
EEXIST
;
return
-
EEXIST
;
iter
->
rt6i_expires
=
rt
->
rt6i_expires
;
iter
->
rt6i_expires
=
rt
->
rt6i_expires
;
...
...
net/ipv6/ip6_flowlabel.c
View file @
b16f3385
...
@@ -500,7 +500,7 @@ int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen)
...
@@ -500,7 +500,7 @@ int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen)
goto
release
;
goto
release
;
err
=
-
EINVAL
;
err
=
-
EINVAL
;
if
(
ipv6_addr_cmp
(
&
fl1
->
dst
,
&
fl
->
dst
)
||
if
(
!
ipv6_addr_equal
(
&
fl1
->
dst
,
&
fl
->
dst
)
||
ipv6_opt_cmp
(
fl1
->
opt
,
fl
->
opt
))
ipv6_opt_cmp
(
fl1
->
opt
,
fl
->
opt
))
goto
release
;
goto
release
;
...
...
net/ipv6/ip6_output.c
View file @
b16f3385
...
@@ -768,9 +768,9 @@ int ip6_dst_lookup(struct sock *sk, struct dst_entry **dst, struct flowi *fl)
...
@@ -768,9 +768,9 @@ int ip6_dst_lookup(struct sock *sk, struct dst_entry **dst, struct flowi *fl)
*/
*/
if
(((
rt
->
rt6i_dst
.
plen
!=
128
||
if
(((
rt
->
rt6i_dst
.
plen
!=
128
||
ipv6_addr_cmp
(
&
fl
->
fl6_dst
,
&
rt
->
rt6i_dst
.
addr
))
!
ipv6_addr_equal
(
&
fl
->
fl6_dst
,
&
rt
->
rt6i_dst
.
addr
))
&&
(
np
->
daddr_cache
==
NULL
||
&&
(
np
->
daddr_cache
==
NULL
||
ipv6_addr_cmp
(
&
fl
->
fl6_dst
,
np
->
daddr_cache
)))
!
ipv6_addr_equal
(
&
fl
->
fl6_dst
,
np
->
daddr_cache
)))
||
(
fl
->
oif
&&
fl
->
oif
!=
(
*
dst
)
->
dev
->
ifindex
))
{
||
(
fl
->
oif
&&
fl
->
oif
!=
(
*
dst
)
->
dev
->
ifindex
))
{
*
dst
=
NULL
;
*
dst
=
NULL
;
}
else
}
else
...
...
net/ipv6/ip6_tunnel.c
View file @
b16f3385
...
@@ -133,8 +133,8 @@ ip6ip6_tnl_lookup(struct in6_addr *remote, struct in6_addr *local)
...
@@ -133,8 +133,8 @@ ip6ip6_tnl_lookup(struct in6_addr *remote, struct in6_addr *local)
struct
ip6_tnl
*
t
;
struct
ip6_tnl
*
t
;
for
(
t
=
tnls_r_l
[
h0
^
h1
];
t
;
t
=
t
->
next
)
{
for
(
t
=
tnls_r_l
[
h0
^
h1
];
t
;
t
=
t
->
next
)
{
if
(
!
ipv6_addr_cmp
(
local
,
&
t
->
parms
.
laddr
)
&&
if
(
ipv6_addr_equal
(
local
,
&
t
->
parms
.
laddr
)
&&
!
ipv6_addr_cmp
(
remote
,
&
t
->
parms
.
raddr
)
&&
ipv6_addr_equal
(
remote
,
&
t
->
parms
.
raddr
)
&&
(
t
->
dev
->
flags
&
IFF_UP
))
(
t
->
dev
->
flags
&
IFF_UP
))
return
t
;
return
t
;
}
}
...
@@ -284,8 +284,8 @@ ip6ip6_tnl_locate(struct ip6_tnl_parm *p, struct ip6_tnl **pt, int create)
...
@@ -284,8 +284,8 @@ ip6ip6_tnl_locate(struct ip6_tnl_parm *p, struct ip6_tnl **pt, int create)
return
-
EINVAL
;
return
-
EINVAL
;
for
(
t
=
*
ip6ip6_bucket
(
p
);
t
;
t
=
t
->
next
)
{
for
(
t
=
*
ip6ip6_bucket
(
p
);
t
;
t
=
t
->
next
)
{
if
(
!
ipv6_addr_cmp
(
local
,
&
t
->
parms
.
laddr
)
&&
if
(
ipv6_addr_equal
(
local
,
&
t
->
parms
.
laddr
)
&&
!
ipv6_addr_cmp
(
remote
,
&
t
->
parms
.
raddr
))
{
ipv6_addr_equal
(
remote
,
&
t
->
parms
.
raddr
))
{
*
pt
=
t
;
*
pt
=
t
;
return
(
create
?
-
EEXIST
:
0
);
return
(
create
?
-
EEXIST
:
0
);
}
}
...
@@ -602,7 +602,7 @@ static inline struct ipv6_txoptions *create_tel(__u8 encap_limit)
...
@@ -602,7 +602,7 @@ static inline struct ipv6_txoptions *create_tel(__u8 encap_limit)
static
inline
int
static
inline
int
ip6ip6_tnl_addr_conflict
(
struct
ip6_tnl
*
t
,
struct
ipv6hdr
*
hdr
)
ip6ip6_tnl_addr_conflict
(
struct
ip6_tnl
*
t
,
struct
ipv6hdr
*
hdr
)
{
{
return
!
ipv6_addr_cmp
(
&
t
->
parms
.
raddr
,
&
hdr
->
saddr
);
return
ipv6_addr_equal
(
&
t
->
parms
.
raddr
,
&
hdr
->
saddr
);
}
}
/**
/**
...
...
net/ipv6/mcast.c
View file @
b16f3385
...
@@ -247,7 +247,7 @@ int ipv6_sock_mc_drop(struct sock *sk, int ifindex, struct in6_addr *addr)
...
@@ -247,7 +247,7 @@ int ipv6_sock_mc_drop(struct sock *sk, int ifindex, struct in6_addr *addr)
write_lock_bh
(
&
ipv6_sk_mc_lock
);
write_lock_bh
(
&
ipv6_sk_mc_lock
);
for
(
lnk
=
&
np
->
ipv6_mc_list
;
(
mc_lst
=
*
lnk
)
!=
NULL
;
lnk
=
&
mc_lst
->
next
)
{
for
(
lnk
=
&
np
->
ipv6_mc_list
;
(
mc_lst
=
*
lnk
)
!=
NULL
;
lnk
=
&
mc_lst
->
next
)
{
if
((
ifindex
==
0
||
mc_lst
->
ifindex
==
ifindex
)
&&
if
((
ifindex
==
0
||
mc_lst
->
ifindex
==
ifindex
)
&&
ipv6_addr_
cmp
(
&
mc_lst
->
addr
,
addr
)
==
0
)
{
ipv6_addr_
equal
(
&
mc_lst
->
addr
,
addr
)
)
{
struct
net_device
*
dev
;
struct
net_device
*
dev
;
*
lnk
=
mc_lst
->
next
;
*
lnk
=
mc_lst
->
next
;
...
@@ -369,7 +369,7 @@ int ip6_mc_source(int add, int omode, struct sock *sk,
...
@@ -369,7 +369,7 @@ int ip6_mc_source(int add, int omode, struct sock *sk,
for
(
pmc
=
inet6
->
ipv6_mc_list
;
pmc
;
pmc
=
pmc
->
next
)
{
for
(
pmc
=
inet6
->
ipv6_mc_list
;
pmc
;
pmc
=
pmc
->
next
)
{
if
(
pgsr
->
gsr_interface
&&
pmc
->
ifindex
!=
pgsr
->
gsr_interface
)
if
(
pgsr
->
gsr_interface
&&
pmc
->
ifindex
!=
pgsr
->
gsr_interface
)
continue
;
continue
;
if
(
ipv6_addr_
cmp
(
&
pmc
->
addr
,
group
)
==
0
)
if
(
ipv6_addr_
equal
(
&
pmc
->
addr
,
group
)
)
break
;
break
;
}
}
if
(
!
pmc
)
/* must have a prior join */
if
(
!
pmc
)
/* must have a prior join */
...
@@ -485,7 +485,7 @@ int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf)
...
@@ -485,7 +485,7 @@ int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf)
for
(
pmc
=
inet6
->
ipv6_mc_list
;
pmc
;
pmc
=
pmc
->
next
)
{
for
(
pmc
=
inet6
->
ipv6_mc_list
;
pmc
;
pmc
=
pmc
->
next
)
{
if
(
pmc
->
ifindex
!=
gsf
->
gf_interface
)
if
(
pmc
->
ifindex
!=
gsf
->
gf_interface
)
continue
;
continue
;
if
(
ipv6_addr_
cmp
(
&
pmc
->
addr
,
group
)
==
0
)
if
(
ipv6_addr_
equal
(
&
pmc
->
addr
,
group
)
)
break
;
break
;
}
}
if
(
!
pmc
)
/* must have a prior join */
if
(
!
pmc
)
/* must have a prior join */
...
@@ -556,7 +556,7 @@ int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf,
...
@@ -556,7 +556,7 @@ int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf,
for
(
pmc
=
inet6
->
ipv6_mc_list
;
pmc
;
pmc
=
pmc
->
next
)
{
for
(
pmc
=
inet6
->
ipv6_mc_list
;
pmc
;
pmc
=
pmc
->
next
)
{
if
(
pmc
->
ifindex
!=
gsf
->
gf_interface
)
if
(
pmc
->
ifindex
!=
gsf
->
gf_interface
)
continue
;
continue
;
if
(
ipv6_addr_
cmp
(
group
,
&
pmc
->
addr
)
==
0
)
if
(
ipv6_addr_
equal
(
group
,
&
pmc
->
addr
)
)
break
;
break
;
}
}
if
(
!
pmc
)
/* must have a prior join */
if
(
!
pmc
)
/* must have a prior join */
...
@@ -603,7 +603,7 @@ int inet6_mc_check(struct sock *sk, struct in6_addr *mc_addr,
...
@@ -603,7 +603,7 @@ int inet6_mc_check(struct sock *sk, struct in6_addr *mc_addr,
read_lock
(
&
ipv6_sk_mc_lock
);
read_lock
(
&
ipv6_sk_mc_lock
);
for
(
mc
=
np
->
ipv6_mc_list
;
mc
;
mc
=
mc
->
next
)
{
for
(
mc
=
np
->
ipv6_mc_list
;
mc
;
mc
=
mc
->
next
)
{
if
(
ipv6_addr_
cmp
(
&
mc
->
addr
,
mc_addr
)
==
0
)
if
(
ipv6_addr_
equal
(
&
mc
->
addr
,
mc_addr
)
)
break
;
break
;
}
}
if
(
!
mc
)
{
if
(
!
mc
)
{
...
@@ -617,7 +617,7 @@ int inet6_mc_check(struct sock *sk, struct in6_addr *mc_addr,
...
@@ -617,7 +617,7 @@ int inet6_mc_check(struct sock *sk, struct in6_addr *mc_addr,
int
i
;
int
i
;
for
(
i
=
0
;
i
<
psl
->
sl_count
;
i
++
)
{
for
(
i
=
0
;
i
<
psl
->
sl_count
;
i
++
)
{
if
(
ipv6_addr_
cmp
(
&
psl
->
sl_addr
[
i
],
src_addr
)
==
0
)
if
(
ipv6_addr_
equal
(
&
psl
->
sl_addr
[
i
],
src_addr
)
)
break
;
break
;
}
}
if
(
mc
->
sfmode
==
MCAST_INCLUDE
&&
i
>=
psl
->
sl_count
)
if
(
mc
->
sfmode
==
MCAST_INCLUDE
&&
i
>=
psl
->
sl_count
)
...
@@ -740,7 +740,7 @@ static void mld_del_delrec(struct inet6_dev *idev, struct in6_addr *pmca)
...
@@ -740,7 +740,7 @@ static void mld_del_delrec(struct inet6_dev *idev, struct in6_addr *pmca)
write_lock_bh
(
&
idev
->
mc_lock
);
write_lock_bh
(
&
idev
->
mc_lock
);
pmc_prev
=
NULL
;
pmc_prev
=
NULL
;
for
(
pmc
=
idev
->
mc_tomb
;
pmc
;
pmc
=
pmc
->
next
)
{
for
(
pmc
=
idev
->
mc_tomb
;
pmc
;
pmc
=
pmc
->
next
)
{
if
(
ipv6_addr_
cmp
(
&
pmc
->
mca_addr
,
pmca
)
==
0
)
if
(
ipv6_addr_
equal
(
&
pmc
->
mca_addr
,
pmca
)
)
break
;
break
;
pmc_prev
=
pmc
;
pmc_prev
=
pmc
;
}
}
...
@@ -816,7 +816,7 @@ int ipv6_dev_mc_inc(struct net_device *dev, struct in6_addr *addr)
...
@@ -816,7 +816,7 @@ int ipv6_dev_mc_inc(struct net_device *dev, struct in6_addr *addr)
}
}
for
(
mc
=
idev
->
mc_list
;
mc
;
mc
=
mc
->
next
)
{
for
(
mc
=
idev
->
mc_list
;
mc
;
mc
=
mc
->
next
)
{
if
(
ipv6_addr_
cmp
(
&
mc
->
mca_addr
,
addr
)
==
0
)
{
if
(
ipv6_addr_
equal
(
&
mc
->
mca_addr
,
addr
)
)
{
mc
->
mca_users
++
;
mc
->
mca_users
++
;
write_unlock_bh
(
&
idev
->
lock
);
write_unlock_bh
(
&
idev
->
lock
);
ip6_mc_add_src
(
idev
,
&
mc
->
mca_addr
,
MCAST_EXCLUDE
,
0
,
ip6_mc_add_src
(
idev
,
&
mc
->
mca_addr
,
MCAST_EXCLUDE
,
0
,
...
@@ -878,7 +878,7 @@ int __ipv6_dev_mc_dec(struct inet6_dev *idev, struct in6_addr *addr)
...
@@ -878,7 +878,7 @@ int __ipv6_dev_mc_dec(struct inet6_dev *idev, struct in6_addr *addr)
write_lock_bh
(
&
idev
->
lock
);
write_lock_bh
(
&
idev
->
lock
);
for
(
map
=
&
idev
->
mc_list
;
(
ma
=*
map
)
!=
NULL
;
map
=
&
ma
->
next
)
{
for
(
map
=
&
idev
->
mc_list
;
(
ma
=*
map
)
!=
NULL
;
map
=
&
ma
->
next
)
{
if
(
ipv6_addr_
cmp
(
&
ma
->
mca_addr
,
addr
)
==
0
)
{
if
(
ipv6_addr_
equal
(
&
ma
->
mca_addr
,
addr
)
)
{
if
(
--
ma
->
mca_users
==
0
)
{
if
(
--
ma
->
mca_users
==
0
)
{
*
map
=
ma
->
next
;
*
map
=
ma
->
next
;
write_unlock_bh
(
&
idev
->
lock
);
write_unlock_bh
(
&
idev
->
lock
);
...
@@ -953,7 +953,7 @@ int ipv6_chk_mcast_addr(struct net_device *dev, struct in6_addr *group,
...
@@ -953,7 +953,7 @@ int ipv6_chk_mcast_addr(struct net_device *dev, struct in6_addr *group,
if
(
idev
)
{
if
(
idev
)
{
read_lock_bh
(
&
idev
->
lock
);
read_lock_bh
(
&
idev
->
lock
);
for
(
mc
=
idev
->
mc_list
;
mc
;
mc
=
mc
->
next
)
{
for
(
mc
=
idev
->
mc_list
;
mc
;
mc
=
mc
->
next
)
{
if
(
ipv6_addr_
cmp
(
&
mc
->
mca_addr
,
group
)
==
0
)
if
(
ipv6_addr_
equal
(
&
mc
->
mca_addr
,
group
)
)
break
;
break
;
}
}
if
(
mc
)
{
if
(
mc
)
{
...
@@ -962,8 +962,7 @@ int ipv6_chk_mcast_addr(struct net_device *dev, struct in6_addr *group,
...
@@ -962,8 +962,7 @@ int ipv6_chk_mcast_addr(struct net_device *dev, struct in6_addr *group,
spin_lock_bh
(
&
mc
->
mca_lock
);
spin_lock_bh
(
&
mc
->
mca_lock
);
for
(
psf
=
mc
->
mca_sources
;
psf
;
psf
=
psf
->
sf_next
)
{
for
(
psf
=
mc
->
mca_sources
;
psf
;
psf
=
psf
->
sf_next
)
{
if
(
ipv6_addr_cmp
(
&
psf
->
sf_addr
,
if
(
ipv6_addr_equal
(
&
psf
->
sf_addr
,
src_addr
))
src_addr
)
==
0
)
break
;
break
;
}
}
if
(
psf
)
if
(
psf
)
...
@@ -1040,7 +1039,7 @@ static void mld_marksources(struct ifmcaddr6 *pmc, int nsrcs,
...
@@ -1040,7 +1039,7 @@ static void mld_marksources(struct ifmcaddr6 *pmc, int nsrcs,
if
(
scount
==
nsrcs
)
if
(
scount
==
nsrcs
)
break
;
break
;
for
(
i
=
0
;
i
<
nsrcs
;
i
++
)
for
(
i
=
0
;
i
<
nsrcs
;
i
++
)
if
(
ipv6_addr_
cmp
(
&
srcs
[
i
],
&
psf
->
sf_addr
)
==
0
)
{
if
(
ipv6_addr_
equal
(
&
srcs
[
i
],
&
psf
->
sf_addr
)
)
{
psf
->
sf_gsresp
=
1
;
psf
->
sf_gsresp
=
1
;
scount
++
;
scount
++
;
break
;
break
;
...
@@ -1135,7 +1134,7 @@ int igmp6_event_query(struct sk_buff *skb)
...
@@ -1135,7 +1134,7 @@ int igmp6_event_query(struct sk_buff *skb)
}
else
{
}
else
{
for
(
ma
=
idev
->
mc_list
;
ma
;
ma
=
ma
->
next
)
{
for
(
ma
=
idev
->
mc_list
;
ma
;
ma
=
ma
->
next
)
{
if
(
group_type
!=
IPV6_ADDR_ANY
&&
if
(
group_type
!=
IPV6_ADDR_ANY
&&
ipv6_addr_cmp
(
group
,
&
ma
->
mca_addr
)
!=
0
)
!
ipv6_addr_equal
(
group
,
&
ma
->
mca_addr
)
)
continue
;
continue
;
spin_lock_bh
(
&
ma
->
mca_lock
);
spin_lock_bh
(
&
ma
->
mca_lock
);
if
(
ma
->
mca_flags
&
MAF_TIMER_RUNNING
)
{
if
(
ma
->
mca_flags
&
MAF_TIMER_RUNNING
)
{
...
@@ -1200,7 +1199,7 @@ int igmp6_event_report(struct sk_buff *skb)
...
@@ -1200,7 +1199,7 @@ int igmp6_event_report(struct sk_buff *skb)
read_lock_bh
(
&
idev
->
lock
);
read_lock_bh
(
&
idev
->
lock
);
for
(
ma
=
idev
->
mc_list
;
ma
;
ma
=
ma
->
next
)
{
for
(
ma
=
idev
->
mc_list
;
ma
;
ma
=
ma
->
next
)
{
if
(
ipv6_addr_
cmp
(
&
ma
->
mca_addr
,
addrp
)
==
0
)
{
if
(
ipv6_addr_
equal
(
&
ma
->
mca_addr
,
addrp
)
)
{
spin_lock
(
&
ma
->
mca_lock
);
spin_lock
(
&
ma
->
mca_lock
);
if
(
del_timer
(
&
ma
->
mca_timer
))
if
(
del_timer
(
&
ma
->
mca_timer
))
atomic_dec
(
&
ma
->
mca_refcnt
);
atomic_dec
(
&
ma
->
mca_refcnt
);
...
@@ -1695,7 +1694,7 @@ static int ip6_mc_del1_src(struct ifmcaddr6 *pmc, int sfmode,
...
@@ -1695,7 +1694,7 @@ static int ip6_mc_del1_src(struct ifmcaddr6 *pmc, int sfmode,
psf_prev
=
NULL
;
psf_prev
=
NULL
;
for
(
psf
=
pmc
->
mca_sources
;
psf
;
psf
=
psf
->
sf_next
)
{
for
(
psf
=
pmc
->
mca_sources
;
psf
;
psf
=
psf
->
sf_next
)
{
if
(
ipv6_addr_
cmp
(
&
psf
->
sf_addr
,
psfsrc
)
==
0
)
if
(
ipv6_addr_
equal
(
&
psf
->
sf_addr
,
psfsrc
)
)
break
;
break
;
psf_prev
=
psf
;
psf_prev
=
psf
;
}
}
...
@@ -1735,7 +1734,7 @@ int ip6_mc_del_src(struct inet6_dev *idev, struct in6_addr *pmca, int sfmode,
...
@@ -1735,7 +1734,7 @@ int ip6_mc_del_src(struct inet6_dev *idev, struct in6_addr *pmca, int sfmode,
return
-
ENODEV
;
return
-
ENODEV
;
read_lock_bh
(
&
idev
->
lock
);
read_lock_bh
(
&
idev
->
lock
);
for
(
pmc
=
idev
->
mc_list
;
pmc
;
pmc
=
pmc
->
next
)
{
for
(
pmc
=
idev
->
mc_list
;
pmc
;
pmc
=
pmc
->
next
)
{
if
(
ipv6_addr_
cmp
(
pmca
,
&
pmc
->
mca_addr
)
==
0
)
if
(
ipv6_addr_
equal
(
pmca
,
&
pmc
->
mca_addr
)
)
break
;
break
;
}
}
if
(
!
pmc
)
{
if
(
!
pmc
)
{
...
@@ -1790,7 +1789,7 @@ static int ip6_mc_add1_src(struct ifmcaddr6 *pmc, int sfmode,
...
@@ -1790,7 +1789,7 @@ static int ip6_mc_add1_src(struct ifmcaddr6 *pmc, int sfmode,
psf_prev
=
NULL
;
psf_prev
=
NULL
;
for
(
psf
=
pmc
->
mca_sources
;
psf
;
psf
=
psf
->
sf_next
)
{
for
(
psf
=
pmc
->
mca_sources
;
psf
;
psf
=
psf
->
sf_next
)
{
if
(
ipv6_addr_
cmp
(
&
psf
->
sf_addr
,
psfsrc
)
==
0
)
if
(
ipv6_addr_
equal
(
&
psf
->
sf_addr
,
psfsrc
)
)
break
;
break
;
psf_prev
=
psf
;
psf_prev
=
psf
;
}
}
...
@@ -1859,7 +1858,7 @@ int ip6_mc_add_src(struct inet6_dev *idev, struct in6_addr *pmca, int sfmode,
...
@@ -1859,7 +1858,7 @@ int ip6_mc_add_src(struct inet6_dev *idev, struct in6_addr *pmca, int sfmode,
return
-
ENODEV
;
return
-
ENODEV
;
read_lock_bh
(
&
idev
->
lock
);
read_lock_bh
(
&
idev
->
lock
);
for
(
pmc
=
idev
->
mc_list
;
pmc
;
pmc
=
pmc
->
next
)
{
for
(
pmc
=
idev
->
mc_list
;
pmc
;
pmc
=
pmc
->
next
)
{
if
(
ipv6_addr_
cmp
(
pmca
,
&
pmc
->
mca_addr
)
==
0
)
if
(
ipv6_addr_
equal
(
pmca
,
&
pmc
->
mca_addr
)
)
break
;
break
;
}
}
if
(
!
pmc
)
{
if
(
!
pmc
)
{
...
...
net/ipv6/ndisc.c
View file @
b16f3385
...
@@ -1219,7 +1219,7 @@ static void ndisc_redirect_rcv(struct sk_buff *skb)
...
@@ -1219,7 +1219,7 @@ static void ndisc_redirect_rcv(struct sk_buff *skb)
return
;
return
;
}
}
if
(
ipv6_addr_
cmp
(
dest
,
target
)
==
0
)
{
if
(
ipv6_addr_
equal
(
dest
,
target
)
)
{
on_link
=
1
;
on_link
=
1
;
}
else
if
(
!
(
ipv6_addr_type
(
target
)
&
IPV6_ADDR_LINKLOCAL
))
{
}
else
if
(
!
(
ipv6_addr_type
(
target
)
&
IPV6_ADDR_LINKLOCAL
))
{
ND_PRINTK2
(
KERN_WARNING
ND_PRINTK2
(
KERN_WARNING
...
...
net/ipv6/netfilter/ip6_queue.c
View file @
b16f3385
...
@@ -376,8 +376,8 @@ ipq_mangle_ipv6(ipq_verdict_msg_t *v, struct ipq_queue_entry *e)
...
@@ -376,8 +376,8 @@ ipq_mangle_ipv6(ipq_verdict_msg_t *v, struct ipq_queue_entry *e)
*/
*/
if
(
e
->
info
->
hook
==
NF_IP_LOCAL_OUT
)
{
if
(
e
->
info
->
hook
==
NF_IP_LOCAL_OUT
)
{
struct
ipv6hdr
*
iph
=
e
->
skb
->
nh
.
ipv6h
;
struct
ipv6hdr
*
iph
=
e
->
skb
->
nh
.
ipv6h
;
if
(
ipv6_addr_cmp
(
&
iph
->
daddr
,
&
e
->
rt_info
.
daddr
)
||
if
(
!
ipv6_addr_equal
(
&
iph
->
daddr
,
&
e
->
rt_info
.
daddr
)
||
ipv6_addr_cmp
(
&
iph
->
saddr
,
&
e
->
rt_info
.
saddr
))
!
ipv6_addr_equal
(
&
iph
->
saddr
,
&
e
->
rt_info
.
saddr
))
return
ip6_route_me_harder
(
e
->
skb
);
return
ip6_route_me_harder
(
e
->
skb
);
}
}
return
0
;
return
0
;
...
...
net/ipv6/netfilter/ip6t_rt.c
View file @
b16f3385
...
@@ -209,7 +209,7 @@ match(const struct sk_buff *skb,
...
@@ -209,7 +209,7 @@ match(const struct sk_buff *skb,
BUG_ON
(
ap
==
NULL
);
BUG_ON
(
ap
==
NULL
);
if
(
!
ipv6_addr_cmp
(
ap
,
&
rtinfo
->
addrs
[
i
]))
{
if
(
ipv6_addr_equal
(
ap
,
&
rtinfo
->
addrs
[
i
]))
{
DEBUGP
(
"i=%d temp=%d;
\n
"
,
i
,
temp
);
DEBUGP
(
"i=%d temp=%d;
\n
"
,
i
,
temp
);
i
++
;
i
++
;
}
}
...
@@ -236,7 +236,7 @@ match(const struct sk_buff *skb,
...
@@ -236,7 +236,7 @@ match(const struct sk_buff *skb,
&
_addr
);
&
_addr
);
BUG_ON
(
ap
==
NULL
);
BUG_ON
(
ap
==
NULL
);
if
(
ipv6_addr_cmp
(
ap
,
&
rtinfo
->
addrs
[
temp
]))
if
(
!
ipv6_addr_equal
(
ap
,
&
rtinfo
->
addrs
[
temp
]))
break
;
break
;
}
}
DEBUGP
(
"temp=%d #%d
\n
"
,
temp
,
rtinfo
->
addrnr
);
DEBUGP
(
"temp=%d #%d
\n
"
,
temp
,
rtinfo
->
addrnr
);
...
...
net/ipv6/raw.c
View file @
b16f3385
...
@@ -90,11 +90,11 @@ struct sock *__raw_v6_lookup(struct sock *sk, unsigned short num,
...
@@ -90,11 +90,11 @@ struct sock *__raw_v6_lookup(struct sock *sk, unsigned short num,
struct
ipv6_pinfo
*
np
=
inet6_sk
(
sk
);
struct
ipv6_pinfo
*
np
=
inet6_sk
(
sk
);
if
(
!
ipv6_addr_any
(
&
np
->
daddr
)
&&
if
(
!
ipv6_addr_any
(
&
np
->
daddr
)
&&
ipv6_addr_cmp
(
&
np
->
daddr
,
rmt_addr
))
!
ipv6_addr_equal
(
&
np
->
daddr
,
rmt_addr
))
continue
;
continue
;
if
(
!
ipv6_addr_any
(
&
np
->
rcv_saddr
))
{
if
(
!
ipv6_addr_any
(
&
np
->
rcv_saddr
))
{
if
(
!
ipv6_addr_cmp
(
&
np
->
rcv_saddr
,
loc_addr
))
if
(
ipv6_addr_equal
(
&
np
->
rcv_saddr
,
loc_addr
))
goto
found
;
goto
found
;
if
(
is_multicast
&&
if
(
is_multicast
&&
inet6_mc_check
(
sk
,
loc_addr
,
rmt_addr
))
inet6_mc_check
(
sk
,
loc_addr
,
rmt_addr
))
...
@@ -668,7 +668,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
...
@@ -668,7 +668,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
* sk->sk_dst_cache.
* sk->sk_dst_cache.
*/
*/
if
(
sk
->
sk_state
==
TCP_ESTABLISHED
&&
if
(
sk
->
sk_state
==
TCP_ESTABLISHED
&&
!
ipv6_addr_cmp
(
daddr
,
&
np
->
daddr
))
ipv6_addr_equal
(
daddr
,
&
np
->
daddr
))
daddr
=
&
np
->
daddr
;
daddr
=
&
np
->
daddr
;
if
(
addr_len
>=
sizeof
(
struct
sockaddr_in6
)
&&
if
(
addr_len
>=
sizeof
(
struct
sockaddr_in6
)
&&
...
@@ -775,7 +775,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
...
@@ -775,7 +775,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
}
}
done:
done:
ip6_dst_store
(
sk
,
dst
,
ip6_dst_store
(
sk
,
dst
,
!
ipv6_addr_cmp
(
&
fl
.
fl6_dst
,
&
np
->
daddr
)
?
ipv6_addr_equal
(
&
fl
.
fl6_dst
,
&
np
->
daddr
)
?
&
np
->
daddr
:
NULL
);
&
np
->
daddr
:
NULL
);
if
(
err
>
0
)
if
(
err
>
0
)
err
=
np
->
recverr
?
net_xmit_errno
(
err
)
:
0
;
err
=
np
->
recverr
?
net_xmit_errno
(
err
)
:
0
;
...
...
net/ipv6/reassembly.c
View file @
b16f3385
...
@@ -342,8 +342,8 @@ static struct frag_queue *ip6_frag_intern(unsigned int hash,
...
@@ -342,8 +342,8 @@ static struct frag_queue *ip6_frag_intern(unsigned int hash,
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
for
(
fq
=
ip6_frag_hash
[
hash
];
fq
;
fq
=
fq
->
next
)
{
for
(
fq
=
ip6_frag_hash
[
hash
];
fq
;
fq
=
fq
->
next
)
{
if
(
fq
->
id
==
fq_in
->
id
&&
if
(
fq
->
id
==
fq_in
->
id
&&
!
ipv6_addr_cmp
(
&
fq_in
->
saddr
,
&
fq
->
saddr
)
&&
ipv6_addr_equal
(
&
fq_in
->
saddr
,
&
fq
->
saddr
)
&&
!
ipv6_addr_cmp
(
&
fq_in
->
daddr
,
&
fq
->
daddr
))
{
ipv6_addr_equal
(
&
fq_in
->
daddr
,
&
fq
->
daddr
))
{
atomic_inc
(
&
fq
->
refcnt
);
atomic_inc
(
&
fq
->
refcnt
);
write_unlock
(
&
ip6_frag_lock
);
write_unlock
(
&
ip6_frag_lock
);
fq_in
->
last_in
|=
COMPLETE
;
fq_in
->
last_in
|=
COMPLETE
;
...
@@ -406,8 +406,8 @@ fq_find(u32 id, struct in6_addr *src, struct in6_addr *dst)
...
@@ -406,8 +406,8 @@ fq_find(u32 id, struct in6_addr *src, struct in6_addr *dst)
read_lock
(
&
ip6_frag_lock
);
read_lock
(
&
ip6_frag_lock
);
for
(
fq
=
ip6_frag_hash
[
hash
];
fq
;
fq
=
fq
->
next
)
{
for
(
fq
=
ip6_frag_hash
[
hash
];
fq
;
fq
=
fq
->
next
)
{
if
(
fq
->
id
==
id
&&
if
(
fq
->
id
==
id
&&
!
ipv6_addr_cmp
(
src
,
&
fq
->
saddr
)
&&
ipv6_addr_equal
(
src
,
&
fq
->
saddr
)
&&
!
ipv6_addr_cmp
(
dst
,
&
fq
->
daddr
))
{
ipv6_addr_equal
(
dst
,
&
fq
->
daddr
))
{
atomic_inc
(
&
fq
->
refcnt
);
atomic_inc
(
&
fq
->
refcnt
);
read_unlock
(
&
ip6_frag_lock
);
read_unlock
(
&
ip6_frag_lock
);
return
fq
;
return
fq
;
...
...
net/ipv6/route.c
View file @
b16f3385
...
@@ -1006,7 +1006,7 @@ static int ip6_route_del(struct in6_rtmsg *rtmsg, struct nlmsghdr *nlh, void *_r
...
@@ -1006,7 +1006,7 @@ static int ip6_route_del(struct in6_rtmsg *rtmsg, struct nlmsghdr *nlh, void *_r
rt
->
rt6i_dev
->
ifindex
!=
rtmsg
->
rtmsg_ifindex
))
rt
->
rt6i_dev
->
ifindex
!=
rtmsg
->
rtmsg_ifindex
))
continue
;
continue
;
if
(
rtmsg
->
rtmsg_flags
&
RTF_GATEWAY
&&
if
(
rtmsg
->
rtmsg_flags
&
RTF_GATEWAY
&&
ipv6_addr_cmp
(
&
rtmsg
->
rtmsg_gateway
,
&
rt
->
rt6i_gateway
))
!
ipv6_addr_equal
(
&
rtmsg
->
rtmsg_gateway
,
&
rt
->
rt6i_gateway
))
continue
;
continue
;
if
(
rtmsg
->
rtmsg_metric
&&
if
(
rtmsg
->
rtmsg_metric
&&
rtmsg
->
rtmsg_metric
!=
rt
->
rt6i_metric
)
rtmsg
->
rtmsg_metric
!=
rt
->
rt6i_metric
)
...
@@ -1057,13 +1057,13 @@ void rt6_redirect(struct in6_addr *dest, struct in6_addr *saddr,
...
@@ -1057,13 +1057,13 @@ void rt6_redirect(struct in6_addr *dest, struct in6_addr *saddr,
* is a bit fuzzy and one might need to check all default
* is a bit fuzzy and one might need to check all default
* routers.
* routers.
*/
*/
if
(
ipv6_addr_cmp
(
saddr
,
&
rt
->
rt6i_gateway
))
{
if
(
!
ipv6_addr_equal
(
saddr
,
&
rt
->
rt6i_gateway
))
{
if
(
rt
->
rt6i_flags
&
RTF_DEFAULT
)
{
if
(
rt
->
rt6i_flags
&
RTF_DEFAULT
)
{
struct
rt6_info
*
rt1
;
struct
rt6_info
*
rt1
;
read_lock
(
&
rt6_lock
);
read_lock
(
&
rt6_lock
);
for
(
rt1
=
ip6_routing_table
.
leaf
;
rt1
;
rt1
=
rt1
->
u
.
next
)
{
for
(
rt1
=
ip6_routing_table
.
leaf
;
rt1
;
rt1
=
rt1
->
u
.
next
)
{
if
(
!
ipv6_addr_cmp
(
saddr
,
&
rt1
->
rt6i_gateway
))
{
if
(
ipv6_addr_equal
(
saddr
,
&
rt1
->
rt6i_gateway
))
{
dst_hold
(
&
rt1
->
u
.
dst
);
dst_hold
(
&
rt1
->
u
.
dst
);
dst_release
(
&
rt
->
u
.
dst
);
dst_release
(
&
rt
->
u
.
dst
);
read_unlock
(
&
rt6_lock
);
read_unlock
(
&
rt6_lock
);
...
@@ -1262,7 +1262,7 @@ struct rt6_info *rt6_get_dflt_router(struct in6_addr *addr, struct net_device *d
...
@@ -1262,7 +1262,7 @@ struct rt6_info *rt6_get_dflt_router(struct in6_addr *addr, struct net_device *d
write_lock_bh
(
&
rt6_lock
);
write_lock_bh
(
&
rt6_lock
);
for
(
rt
=
fn
->
leaf
;
rt
;
rt
=
rt
->
u
.
next
)
{
for
(
rt
=
fn
->
leaf
;
rt
;
rt
=
rt
->
u
.
next
)
{
if
(
dev
==
rt
->
rt6i_dev
&&
if
(
dev
==
rt
->
rt6i_dev
&&
ipv6_addr_
cmp
(
&
rt
->
rt6i_gateway
,
addr
)
==
0
)
ipv6_addr_
equal
(
&
rt
->
rt6i_gateway
,
addr
)
)
break
;
break
;
}
}
if
(
rt
)
if
(
rt
)
...
...
net/ipv6/tcp_ipv6.c
View file @
b16f3385
...
@@ -262,7 +262,7 @@ static struct sock *tcp_v6_lookup_listener(struct in6_addr *daddr, unsigned shor
...
@@ -262,7 +262,7 @@ static struct sock *tcp_v6_lookup_listener(struct in6_addr *daddr, unsigned shor
score
=
1
;
score
=
1
;
if
(
!
ipv6_addr_any
(
&
np
->
rcv_saddr
))
{
if
(
!
ipv6_addr_any
(
&
np
->
rcv_saddr
))
{
if
(
ipv6_addr_cmp
(
&
np
->
rcv_saddr
,
daddr
))
if
(
!
ipv6_addr_equal
(
&
np
->
rcv_saddr
,
daddr
))
continue
;
continue
;
score
++
;
score
++
;
}
}
...
@@ -321,8 +321,8 @@ static inline struct sock *__tcp_v6_lookup_established(struct in6_addr *saddr, u
...
@@ -321,8 +321,8 @@ static inline struct sock *__tcp_v6_lookup_established(struct in6_addr *saddr, u
if
(
*
((
__u32
*
)
&
(
tw
->
tw_dport
))
==
ports
&&
if
(
*
((
__u32
*
)
&
(
tw
->
tw_dport
))
==
ports
&&
sk
->
sk_family
==
PF_INET6
)
{
sk
->
sk_family
==
PF_INET6
)
{
if
(
!
ipv6_addr_cmp
(
&
tw
->
tw_v6_daddr
,
saddr
)
&&
if
(
ipv6_addr_equal
(
&
tw
->
tw_v6_daddr
,
saddr
)
&&
!
ipv6_addr_cmp
(
&
tw
->
tw_v6_rcv_saddr
,
daddr
)
&&
ipv6_addr_equal
(
&
tw
->
tw_v6_rcv_saddr
,
daddr
)
&&
(
!
sk
->
sk_bound_dev_if
||
sk
->
sk_bound_dev_if
==
dif
))
(
!
sk
->
sk_bound_dev_if
||
sk
->
sk_bound_dev_if
==
dif
))
goto
hit
;
goto
hit
;
}
}
...
@@ -406,8 +406,8 @@ static struct open_request *tcp_v6_search_req(struct tcp_opt *tp,
...
@@ -406,8 +406,8 @@ static struct open_request *tcp_v6_search_req(struct tcp_opt *tp,
prev
=
&
req
->
dl_next
)
{
prev
=
&
req
->
dl_next
)
{
if
(
req
->
rmt_port
==
rport
&&
if
(
req
->
rmt_port
==
rport
&&
req
->
class
->
family
==
AF_INET6
&&
req
->
class
->
family
==
AF_INET6
&&
!
ipv6_addr_cmp
(
&
req
->
af
.
v6_req
.
rmt_addr
,
raddr
)
&&
ipv6_addr_equal
(
&
req
->
af
.
v6_req
.
rmt_addr
,
raddr
)
&&
!
ipv6_addr_cmp
(
&
req
->
af
.
v6_req
.
loc_addr
,
laddr
)
&&
ipv6_addr_equal
(
&
req
->
af
.
v6_req
.
loc_addr
,
laddr
)
&&
(
!
req
->
af
.
v6_req
.
iif
||
req
->
af
.
v6_req
.
iif
==
iif
))
{
(
!
req
->
af
.
v6_req
.
iif
||
req
->
af
.
v6_req
.
iif
==
iif
))
{
BUG_TRAP
(
req
->
sk
==
NULL
);
BUG_TRAP
(
req
->
sk
==
NULL
);
*
prevp
=
prev
;
*
prevp
=
prev
;
...
@@ -463,8 +463,8 @@ static int tcp_v6_check_established(struct sock *sk)
...
@@ -463,8 +463,8 @@ static int tcp_v6_check_established(struct sock *sk)
if
(
*
((
__u32
*
)
&
(
tw
->
tw_dport
))
==
ports
&&
if
(
*
((
__u32
*
)
&
(
tw
->
tw_dport
))
==
ports
&&
sk2
->
sk_family
==
PF_INET6
&&
sk2
->
sk_family
==
PF_INET6
&&
!
ipv6_addr_cmp
(
&
tw
->
tw_v6_daddr
,
saddr
)
&&
ipv6_addr_equal
(
&
tw
->
tw_v6_daddr
,
saddr
)
&&
!
ipv6_addr_cmp
(
&
tw
->
tw_v6_rcv_saddr
,
daddr
)
&&
ipv6_addr_equal
(
&
tw
->
tw_v6_rcv_saddr
,
daddr
)
&&
sk2
->
sk_bound_dev_if
==
sk
->
sk_bound_dev_if
)
{
sk2
->
sk_bound_dev_if
==
sk
->
sk_bound_dev_if
)
{
struct
tcp_opt
*
tp
=
tcp_sk
(
sk
);
struct
tcp_opt
*
tp
=
tcp_sk
(
sk
);
...
@@ -610,7 +610,7 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
...
@@ -610,7 +610,7 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
}
}
if
(
tp
->
ts_recent_stamp
&&
if
(
tp
->
ts_recent_stamp
&&
ipv6_addr_cmp
(
&
np
->
daddr
,
&
usin
->
sin6_addr
))
{
!
ipv6_addr_equal
(
&
np
->
daddr
,
&
usin
->
sin6_addr
))
{
tp
->
ts_recent
=
0
;
tp
->
ts_recent
=
0
;
tp
->
ts_recent_stamp
=
0
;
tp
->
ts_recent_stamp
=
0
;
tp
->
write_seq
=
0
;
tp
->
write_seq
=
0
;
...
...
net/ipv6/udp.c
View file @
b16f3385
...
@@ -171,12 +171,12 @@ static struct sock *udp_v6_lookup(struct in6_addr *saddr, u16 sport,
...
@@ -171,12 +171,12 @@ static struct sock *udp_v6_lookup(struct in6_addr *saddr, u16 sport,
score
++
;
score
++
;
}
}
if
(
!
ipv6_addr_any
(
&
np
->
rcv_saddr
))
{
if
(
!
ipv6_addr_any
(
&
np
->
rcv_saddr
))
{
if
(
ipv6_addr_cmp
(
&
np
->
rcv_saddr
,
daddr
))
if
(
!
ipv6_addr_equal
(
&
np
->
rcv_saddr
,
daddr
))
continue
;
continue
;
score
++
;
score
++
;
}
}
if
(
!
ipv6_addr_any
(
&
np
->
daddr
))
{
if
(
!
ipv6_addr_any
(
&
np
->
daddr
))
{
if
(
ipv6_addr_cmp
(
&
np
->
daddr
,
saddr
))
if
(
!
ipv6_addr_equal
(
&
np
->
daddr
,
saddr
))
continue
;
continue
;
score
++
;
score
++
;
}
}
...
@@ -395,14 +395,14 @@ static struct sock *udp_v6_mcast_next(struct sock *sk,
...
@@ -395,14 +395,14 @@ static struct sock *udp_v6_mcast_next(struct sock *sk,
continue
;
continue
;
}
}
if
(
!
ipv6_addr_any
(
&
np
->
daddr
)
&&
if
(
!
ipv6_addr_any
(
&
np
->
daddr
)
&&
ipv6_addr_cmp
(
&
np
->
daddr
,
rmt_addr
))
!
ipv6_addr_equal
(
&
np
->
daddr
,
rmt_addr
))
continue
;
continue
;
if
(
s
->
sk_bound_dev_if
&&
s
->
sk_bound_dev_if
!=
dif
)
if
(
s
->
sk_bound_dev_if
&&
s
->
sk_bound_dev_if
!=
dif
)
continue
;
continue
;
if
(
!
ipv6_addr_any
(
&
np
->
rcv_saddr
))
{
if
(
!
ipv6_addr_any
(
&
np
->
rcv_saddr
))
{
if
(
!
ipv6_addr_cmp
(
&
np
->
rcv_saddr
,
loc_addr
))
if
(
ipv6_addr_equal
(
&
np
->
rcv_saddr
,
loc_addr
))
return
s
;
return
s
;
continue
;
continue
;
}
}
...
@@ -732,7 +732,7 @@ static int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk,
...
@@ -732,7 +732,7 @@ static int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk,
* sk->sk_dst_cache.
* sk->sk_dst_cache.
*/
*/
if
(
sk
->
sk_state
==
TCP_ESTABLISHED
&&
if
(
sk
->
sk_state
==
TCP_ESTABLISHED
&&
!
ipv6_addr_cmp
(
daddr
,
&
np
->
daddr
))
ipv6_addr_equal
(
daddr
,
&
np
->
daddr
))
daddr
=
&
np
->
daddr
;
daddr
=
&
np
->
daddr
;
if
(
addr_len
>=
sizeof
(
struct
sockaddr_in6
)
&&
if
(
addr_len
>=
sizeof
(
struct
sockaddr_in6
)
&&
...
@@ -840,7 +840,7 @@ static int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk,
...
@@ -840,7 +840,7 @@ static int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk,
if
(
dst
)
if
(
dst
)
ip6_dst_store
(
sk
,
dst
,
ip6_dst_store
(
sk
,
dst
,
!
ipv6_addr_cmp
(
&
fl
->
fl6_dst
,
&
np
->
daddr
)
?
ipv6_addr_equal
(
&
fl
->
fl6_dst
,
&
np
->
daddr
)
?
&
np
->
daddr
:
NULL
);
&
np
->
daddr
:
NULL
);
if
(
err
>
0
)
if
(
err
>
0
)
err
=
np
->
recverr
?
net_xmit_errno
(
err
)
:
0
;
err
=
np
->
recverr
?
net_xmit_errno
(
err
)
:
0
;
...
...
net/ipv6/xfrm6_policy.c
View file @
b16f3385
...
@@ -68,8 +68,8 @@ __xfrm6_find_bundle(struct flowi *fl, struct xfrm_policy *policy)
...
@@ -68,8 +68,8 @@ __xfrm6_find_bundle(struct flowi *fl, struct xfrm_policy *policy)
ipv6_addr_prefix
(
&
fl_src_prefix
,
ipv6_addr_prefix
(
&
fl_src_prefix
,
&
fl
->
fl6_src
,
&
fl
->
fl6_src
,
xdst
->
u
.
rt6
.
rt6i_src
.
plen
);
xdst
->
u
.
rt6
.
rt6i_src
.
plen
);
if
(
!
ipv6_addr_cmp
(
&
xdst
->
u
.
rt6
.
rt6i_dst
.
addr
,
&
fl_dst_prefix
)
&&
if
(
ipv6_addr_equal
(
&
xdst
->
u
.
rt6
.
rt6i_dst
.
addr
,
&
fl_dst_prefix
)
&&
!
ipv6_addr_cmp
(
&
xdst
->
u
.
rt6
.
rt6i_src
.
addr
,
&
fl_src_prefix
)
&&
ipv6_addr_equal
(
&
xdst
->
u
.
rt6
.
rt6i_src
.
addr
,
&
fl_src_prefix
)
&&
__xfrm6_bundle_ok
(
xdst
,
fl
))
{
__xfrm6_bundle_ok
(
xdst
,
fl
))
{
dst_clone
(
dst
);
dst_clone
(
dst
);
break
;
break
;
...
@@ -123,7 +123,7 @@ __xfrm6_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int
...
@@ -123,7 +123,7 @@ __xfrm6_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int
trailer_len
+=
xfrm
[
i
]
->
props
.
trailer_len
;
trailer_len
+=
xfrm
[
i
]
->
props
.
trailer_len
;
}
}
if
(
ipv6_addr_cmp
(
remote
,
&
fl
->
fl6_dst
))
{
if
(
!
ipv6_addr_equal
(
remote
,
&
fl
->
fl6_dst
))
{
struct
flowi
fl_tunnel
;
struct
flowi
fl_tunnel
;
memset
(
&
fl_tunnel
,
0
,
sizeof
(
fl_tunnel
));
memset
(
&
fl_tunnel
,
0
,
sizeof
(
fl_tunnel
));
...
...
net/ipv6/xfrm6_state.c
View file @
b16f3385
...
@@ -55,7 +55,7 @@ __xfrm6_state_lookup(xfrm_address_t *daddr, u32 spi, u8 proto)
...
@@ -55,7 +55,7 @@ __xfrm6_state_lookup(xfrm_address_t *daddr, u32 spi, u8 proto)
list_for_each_entry
(
x
,
xfrm6_state_afinfo
.
state_byspi
+
h
,
byspi
)
{
list_for_each_entry
(
x
,
xfrm6_state_afinfo
.
state_byspi
+
h
,
byspi
)
{
if
(
x
->
props
.
family
==
AF_INET6
&&
if
(
x
->
props
.
family
==
AF_INET6
&&
spi
==
x
->
id
.
spi
&&
spi
==
x
->
id
.
spi
&&
!
ipv6_addr_cmp
((
struct
in6_addr
*
)
daddr
,
(
struct
in6_addr
*
)
x
->
id
.
daddr
.
a6
)
&&
ipv6_addr_equal
((
struct
in6_addr
*
)
daddr
,
(
struct
in6_addr
*
)
x
->
id
.
daddr
.
a6
)
&&
proto
==
x
->
id
.
proto
)
{
proto
==
x
->
id
.
proto
)
{
xfrm_state_hold
(
x
);
xfrm_state_hold
(
x
);
return
x
;
return
x
;
...
@@ -76,10 +76,10 @@ __xfrm6_find_acq(u8 mode, u32 reqid, u8 proto,
...
@@ -76,10 +76,10 @@ __xfrm6_find_acq(u8 mode, u32 reqid, u8 proto,
list_for_each_entry
(
x
,
xfrm6_state_afinfo
.
state_bydst
+
h
,
bydst
)
{
list_for_each_entry
(
x
,
xfrm6_state_afinfo
.
state_bydst
+
h
,
bydst
)
{
if
(
x
->
props
.
family
==
AF_INET6
&&
if
(
x
->
props
.
family
==
AF_INET6
&&
!
ipv6_addr_cmp
((
struct
in6_addr
*
)
daddr
,
(
struct
in6_addr
*
)
x
->
id
.
daddr
.
a6
)
&&
ipv6_addr_equal
((
struct
in6_addr
*
)
daddr
,
(
struct
in6_addr
*
)
x
->
id
.
daddr
.
a6
)
&&
mode
==
x
->
props
.
mode
&&
mode
==
x
->
props
.
mode
&&
proto
==
x
->
id
.
proto
&&
proto
==
x
->
id
.
proto
&&
!
ipv6_addr_cmp
((
struct
in6_addr
*
)
saddr
,
(
struct
in6_addr
*
)
x
->
props
.
saddr
.
a6
)
&&
ipv6_addr_equal
((
struct
in6_addr
*
)
saddr
,
(
struct
in6_addr
*
)
x
->
props
.
saddr
.
a6
)
&&
reqid
==
x
->
props
.
reqid
&&
reqid
==
x
->
props
.
reqid
&&
x
->
km
.
state
==
XFRM_STATE_ACQ
&&
x
->
km
.
state
==
XFRM_STATE_ACQ
&&
!
x
->
id
.
spi
)
{
!
x
->
id
.
spi
)
{
...
...
net/sctp/ipv6.c
View file @
b16f3385
...
@@ -461,7 +461,7 @@ static int sctp_v6_cmp_addr(const union sctp_addr *addr1,
...
@@ -461,7 +461,7 @@ static int sctp_v6_cmp_addr(const union sctp_addr *addr1,
}
}
return
0
;
return
0
;
}
}
if
(
ipv6_addr_cmp
(
&
addr1
->
v6
.
sin6_addr
,
&
addr2
->
v6
.
sin6_addr
))
if
(
!
ipv6_addr_equal
(
&
addr1
->
v6
.
sin6_addr
,
&
addr2
->
v6
.
sin6_addr
))
return
0
;
return
0
;
/* If this is a linklocal address, compare the scope_id. */
/* If this is a linklocal address, compare the scope_id. */
if
(
ipv6_addr_type
(
&
addr1
->
v6
.
sin6_addr
)
&
IPV6_ADDR_LINKLOCAL
)
{
if
(
ipv6_addr_type
(
&
addr1
->
v6
.
sin6_addr
)
&
IPV6_ADDR_LINKLOCAL
)
{
...
...
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