Unverified Commit 00316e89 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!9393 net: lts v4.311 backport

Merge Pull Request from: @ci-robot 
 
PR sync from: Dong Chenchen <dongchenchen2@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/2N3LCY6WZRP2TD2BUAH2VBPLEKR227AZ/ 
net lts patch v4.311 backport

Christophe JAILLET (1):
  net: sunrpc: Fix an off by one in rpc_sockaddr2uaddr()

Shiming Cheng (1):
  ipv6: fib6_rules: flush route cache when rule is changed


-- 
2.25.1
 
https://gitee.com/openeuler/kernel/issues/IA7YCW 
 
Link:https://gitee.com/openeuler/kernel/pulls/9393

 

Reviewed-by: default avatarYue Haibing <yuehaibing@huawei.com>
Reviewed-by: default avatarLiu YongQiang <liuyongqiang13@huawei.com>
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
parents 7cdbedac 76c3b6ba
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -441,6 +441,11 @@ static size_t fib6_rule_nlmsg_payload(struct fib_rule *rule)
	       + nla_total_size(16); /* src */
}

static void fib6_rule_flush_cache(struct fib_rules_ops *ops)
{
	rt_genid_bump_ipv6(ops->fro_net);
}

static const struct fib_rules_ops __net_initconst fib6_rules_ops_template = {
	.family			= AF_INET6,
	.rule_size		= sizeof(struct fib6_rule),
@@ -453,6 +458,7 @@ static const struct fib_rules_ops __net_initconst fib6_rules_ops_template = {
	.compare		= fib6_rule_compare,
	.fill			= fib6_rule_fill,
	.nlmsg_payload		= fib6_rule_nlmsg_payload,
	.flush_cache		= fib6_rule_flush_cache,
	.nlgroup		= RTNLGRP_IPV6_RULE,
	.policy			= fib6_rule_policy,
	.owner			= THIS_MODULE,
+2 −2
Original line number Diff line number Diff line
@@ -287,10 +287,10 @@ char *rpc_sockaddr2uaddr(const struct sockaddr *sap, gfp_t gfp_flags)
	}

	if (snprintf(portbuf, sizeof(portbuf),
		     ".%u.%u", port >> 8, port & 0xff) > (int)sizeof(portbuf))
		     ".%u.%u", port >> 8, port & 0xff) >= (int)sizeof(portbuf))
		return NULL;

	if (strlcat(addrbuf, portbuf, sizeof(addrbuf)) > sizeof(addrbuf))
	if (strlcat(addrbuf, portbuf, sizeof(addrbuf)) >= sizeof(addrbuf))
		return NULL;

	return kstrdup(addrbuf, gfp_flags);