mirror of
https://github.com/torvalds/linux
synced 2024-09-06 18:01:05 +00:00
ipv4: raw: constify raw_v4_match() socket argument
This clarifies raw_v4_match() intent. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
db6af4fdb1
commit
0a8c256820
|
@ -22,7 +22,7 @@
|
|||
extern struct proto raw_prot;
|
||||
|
||||
extern struct raw_hashinfo raw_v4_hashinfo;
|
||||
bool raw_v4_match(struct net *net, struct sock *sk, unsigned short num,
|
||||
bool raw_v4_match(struct net *net, const struct sock *sk, unsigned short num,
|
||||
__be32 raddr, __be32 laddr, int dif, int sdif);
|
||||
|
||||
int raw_abort(struct sock *sk, int err);
|
||||
|
|
|
@ -116,10 +116,10 @@ void raw_unhash_sk(struct sock *sk)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(raw_unhash_sk);
|
||||
|
||||
bool raw_v4_match(struct net *net, struct sock *sk, unsigned short num,
|
||||
bool raw_v4_match(struct net *net, const struct sock *sk, unsigned short num,
|
||||
__be32 raddr, __be32 laddr, int dif, int sdif)
|
||||
{
|
||||
struct inet_sock *inet = inet_sk(sk);
|
||||
const struct inet_sock *inet = inet_sk(sk);
|
||||
|
||||
if (net_eq(sock_net(sk), net) && inet->inet_num == num &&
|
||||
!(inet->inet_daddr && inet->inet_daddr != raddr) &&
|
||||
|
|
Loading…
Reference in a new issue