diff options
Diffstat (limited to 'net/ipv6')
| -rw-r--r-- | net/ipv6/ip6_output.c | 3 | ||||
| -rw-r--r-- | net/ipv6/seg6_local.c | 10 | 
2 files changed, 6 insertions, 7 deletions
| diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 897ca4f9b791..f152e51242cb 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -1311,8 +1311,7 @@ struct dst_entry *ip6_dst_lookup_tunnel(struct sk_buff *skb,  	fl6.daddr = info->key.u.ipv6.dst;  	fl6.saddr = info->key.u.ipv6.src;  	prio = info->key.tos; -	fl6.flowlabel = ip6_make_flowinfo(RT_TOS(prio), -					  info->key.label); +	fl6.flowlabel = ip6_make_flowinfo(prio, info->key.label);  	dst = ipv6_stub->ipv6_dst_lookup_flow(net, sock->sk, &fl6,  					      NULL); diff --git a/net/ipv6/seg6_local.c b/net/ipv6/seg6_local.c index 2cd4a8d3b30a..b7de5e46fdd8 100644 --- a/net/ipv6/seg6_local.c +++ b/net/ipv6/seg6_local.c @@ -1614,7 +1614,7 @@ static void __destroy_attrs(unsigned long parsed_attrs, int max_parsed,  	 * callback. If the callback is not available, then we skip to the next  	 * attribute; otherwise, we call the destroy() callback.  	 */ -	for (i = 0; i < max_parsed; ++i) { +	for (i = SEG6_LOCAL_SRH; i < max_parsed; ++i) {  		if (!(parsed_attrs & SEG6_F_ATTR(i)))  			continue; @@ -1643,7 +1643,7 @@ static int parse_nla_optional_attrs(struct nlattr **attrs,  	struct seg6_action_param *param;  	int err, i; -	for (i = 0; i < SEG6_LOCAL_MAX + 1; ++i) { +	for (i = SEG6_LOCAL_SRH; i < SEG6_LOCAL_MAX + 1; ++i) {  		if (!(desc->optattrs & SEG6_F_ATTR(i)) || !attrs[i])  			continue; @@ -1742,7 +1742,7 @@ static int parse_nla_action(struct nlattr **attrs, struct seg6_local_lwt *slwt)  	}  	/* parse the required attributes */ -	for (i = 0; i < SEG6_LOCAL_MAX + 1; i++) { +	for (i = SEG6_LOCAL_SRH; i < SEG6_LOCAL_MAX + 1; i++) {  		if (desc->attrs & SEG6_F_ATTR(i)) {  			if (!attrs[i])  				return -EINVAL; @@ -1847,7 +1847,7 @@ static int seg6_local_fill_encap(struct sk_buff *skb,  	attrs = slwt->desc->attrs | slwt->parsed_optattrs; -	for (i = 0; i < SEG6_LOCAL_MAX + 1; i++) { +	for (i = SEG6_LOCAL_SRH; i < SEG6_LOCAL_MAX + 1; i++) {  		if (attrs & SEG6_F_ATTR(i)) {  			param = &seg6_action_params[i];  			err = param->put(skb, slwt); @@ -1927,7 +1927,7 @@ static int seg6_local_cmp_encap(struct lwtunnel_state *a,  	if (attrs_a != attrs_b)  		return 1; -	for (i = 0; i < SEG6_LOCAL_MAX + 1; i++) { +	for (i = SEG6_LOCAL_SRH; i < SEG6_LOCAL_MAX + 1; i++) {  		if (attrs_a & SEG6_F_ATTR(i)) {  			param = &seg6_action_params[i];  			if (param->cmp(slwt_a, slwt_b)) |