net: ipv6: remove unused arg exact_dif in compute_score
The arg exact_dif is not used anymore, remove it. inet6_exact_dif_match() is no longer needed after the above is removed, remove it too. Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
10eb466794
commit
3f7d820bad
@ -177,17 +177,6 @@ static inline int inet6_sdif(const struct sk_buff *skb)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* can not be used in TCP layer after tcp_v6_fill_cb */
|
||||
static inline bool inet6_exact_dif_match(struct net *net, struct sk_buff *skb)
|
||||
{
|
||||
#if defined(CONFIG_NET_L3_MASTER_DEV)
|
||||
if (!net->ipv4.sysctl_tcp_l3mdev_accept &&
|
||||
skb && ipv6_l3mdev_skb(IP6CB(skb)->flags))
|
||||
return true;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
struct tcp6_request_sock {
|
||||
struct tcp_request_sock tcp6rsk_tcp;
|
||||
};
|
||||
|
@ -94,7 +94,7 @@ EXPORT_SYMBOL(__inet6_lookup_established);
|
||||
static inline int compute_score(struct sock *sk, struct net *net,
|
||||
const unsigned short hnum,
|
||||
const struct in6_addr *daddr,
|
||||
const int dif, const int sdif, bool exact_dif)
|
||||
const int dif, const int sdif)
|
||||
{
|
||||
int score = -1;
|
||||
|
||||
@ -138,15 +138,13 @@ static struct sock *inet6_lhash2_lookup(struct net *net,
|
||||
const __be16 sport, const struct in6_addr *daddr,
|
||||
const unsigned short hnum, const int dif, const int sdif)
|
||||
{
|
||||
bool exact_dif = inet6_exact_dif_match(net, skb);
|
||||
struct inet_connection_sock *icsk;
|
||||
struct sock *sk, *result = NULL;
|
||||
int score, hiscore = 0;
|
||||
|
||||
inet_lhash2_for_each_icsk_rcu(icsk, &ilb2->head) {
|
||||
sk = (struct sock *)icsk;
|
||||
score = compute_score(sk, net, hnum, daddr, dif, sdif,
|
||||
exact_dif);
|
||||
score = compute_score(sk, net, hnum, daddr, dif, sdif);
|
||||
if (score > hiscore) {
|
||||
result = lookup_reuseport(net, sk, skb, doff,
|
||||
saddr, sport, daddr, hnum);
|
||||
|
Loading…
Reference in New Issue
Block a user