mirror of
https://github.com/torvalds/linux.git
synced 2026-09-14 16:10:02 +02:00
netfilter: flowtable: rename tun.l3_proto to tun.inner_proto
This field refers to the inner protocol that is encapsulated by the tunnel header, just a comestic change. No functional changes are expected. Acked-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
5592223f3d
commit
cb1d3ae6a7
|
|
@ -904,7 +904,7 @@ struct net_device_path {
|
|||
struct in6_addr dst_v6;
|
||||
};
|
||||
|
||||
u8 l3_proto;
|
||||
u8 inner_proto;
|
||||
} tun;
|
||||
struct {
|
||||
enum {
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ struct flow_offload_tunnel {
|
|||
struct in6_addr dst_v6;
|
||||
};
|
||||
|
||||
u8 l3_proto;
|
||||
u8 inner_proto;
|
||||
};
|
||||
|
||||
struct flow_offload_tuple {
|
||||
|
|
|
|||
|
|
@ -378,7 +378,7 @@ static int ipip_fill_forward_path(struct net_device_path_ctx *ctx,
|
|||
path->type = DEV_PATH_TUN;
|
||||
path->tun.src_v4.s_addr = tiph->saddr;
|
||||
path->tun.dst_v4.s_addr = tiph->daddr;
|
||||
path->tun.l3_proto = IPPROTO_IPIP;
|
||||
path->tun.inner_proto = IPPROTO_IPIP;
|
||||
path->tun.dst = &rt->dst;
|
||||
path->dev = ctx->dev;
|
||||
|
||||
|
|
|
|||
|
|
@ -1875,7 +1875,7 @@ static int ip6_tnl_fill_forward_path(struct net_device_path_ctx *ctx,
|
|||
path->type = DEV_PATH_TUN;
|
||||
path->tun.src_v6 = fl6.saddr;
|
||||
path->tun.dst_v6 = fl6.daddr;
|
||||
path->tun.l3_proto = IPPROTO_IPV6;
|
||||
path->tun.inner_proto = IPPROTO_IPV6;
|
||||
path->tun.dst = dst;
|
||||
path->dev = ctx->dev;
|
||||
ctx->dev = dst->dev;
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ static void nf_flow_tuple_encap(struct nf_flowtable_ctx *ctx,
|
|||
if (ctx->tun.proto == IPPROTO_IPIP) {
|
||||
tuple->tun.dst_v4.s_addr = iph->daddr;
|
||||
tuple->tun.src_v4.s_addr = iph->saddr;
|
||||
tuple->tun.l3_proto = IPPROTO_IPIP;
|
||||
tuple->tun.inner_proto = IPPROTO_IPIP;
|
||||
}
|
||||
break;
|
||||
case htons(ETH_P_IPV6):
|
||||
|
|
@ -205,7 +205,7 @@ static void nf_flow_tuple_encap(struct nf_flowtable_ctx *ctx,
|
|||
if (ctx->tun.proto == IPPROTO_IPV6) {
|
||||
tuple->tun.dst_v6 = ip6h->daddr;
|
||||
tuple->tun.src_v6 = ip6h->saddr;
|
||||
tuple->tun.l3_proto = IPPROTO_IPV6;
|
||||
tuple->tun.inner_proto = IPPROTO_IPV6;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
@ -612,7 +612,7 @@ static int nf_flow_tunnel_ipip_push(struct net *net, struct sk_buff *skb,
|
|||
iph->version = 4;
|
||||
iph->ihl = sizeof(*iph) >> 2;
|
||||
iph->frag_off = ip_mtu_locked(&rt->dst) ? 0 : frag_off;
|
||||
iph->protocol = tuple->tun.l3_proto;
|
||||
iph->protocol = tuple->tun.inner_proto;
|
||||
iph->tos = tos;
|
||||
iph->daddr = tuple->tun.src_v4.s_addr;
|
||||
iph->saddr = tuple->tun.dst_v4.s_addr;
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ static int nft_dev_path_info(struct net_device_path_stack *stack,
|
|||
|
||||
info->tun.src_v6 = path->tun.src_v6;
|
||||
info->tun.dst_v6 = path->tun.dst_v6;
|
||||
info->tun.l3_proto = path->tun.l3_proto;
|
||||
info->tun.inner_proto = path->tun.inner_proto;
|
||||
info->tun_dst = path->tun.dst;
|
||||
info->num_tuns++;
|
||||
} else {
|
||||
|
|
@ -245,7 +245,7 @@ static int nft_dev_forward_path(const struct nft_pktinfo *pkt,
|
|||
if (info.num_tuns) {
|
||||
route->tuple[!dir].in.tun.src_v6 = info.tun.dst_v6;
|
||||
route->tuple[!dir].in.tun.dst_v6 = info.tun.src_v6;
|
||||
route->tuple[!dir].in.tun.l3_proto = info.tun.l3_proto;
|
||||
route->tuple[!dir].in.tun.inner_proto = info.tun.inner_proto;
|
||||
route->tuple[!dir].in.num_tuns = info.num_tuns;
|
||||
dst_release(route->tuple[dir].dst);
|
||||
route->tuple[dir].dst = info.tun_dst;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user