Revert "net: use struct_group to copy ip/ipv6 header addresses"

This reverts commit cb7893c85e which is
commit 58e0be1ef6118c5352b56a4d06e974c5599993a5 upstream.

It causes a CRC change, in order to just remove a build warning that is
not correct.  So just revert it as it's not needed in the Android kernel
at all.

Bug: 161946584
Fixes: cb7893c85e ("net: use struct_group to copy ip/ipv6 header addresses")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I68a5f94066911a49dd8cb04d38291e27cb446f6f
This commit is contained in:
Greg Kroah-Hartman
2023-01-20 12:57:41 +00:00
parent c46ed1b2d7
commit 72d681a01d
4 changed files with 6 additions and 10 deletions

View File

@@ -571,7 +571,7 @@ static inline void iph_to_flow_copy_v4addrs(struct flow_keys *flow,
BUILD_BUG_ON(offsetof(typeof(flow->addrs), v4addrs.dst) !=
offsetof(typeof(flow->addrs), v4addrs.src) +
sizeof(flow->addrs.v4addrs.src));
memcpy(&flow->addrs.v4addrs, &iph->addrs, sizeof(flow->addrs.v4addrs));
memcpy(&flow->addrs.v4addrs, &iph->saddr, sizeof(flow->addrs.v4addrs));
flow->control.addr_type = FLOW_DISSECTOR_KEY_IPV4_ADDRS;
}

View File

@@ -843,7 +843,7 @@ static inline void iph_to_flow_copy_v6addrs(struct flow_keys *flow,
BUILD_BUG_ON(offsetof(typeof(flow->addrs), v6addrs.dst) !=
offsetof(typeof(flow->addrs), v6addrs.src) +
sizeof(flow->addrs.v6addrs.src));
memcpy(&flow->addrs.v6addrs, &iph->addrs, sizeof(flow->addrs.v6addrs));
memcpy(&flow->addrs.v6addrs, &iph->saddr, sizeof(flow->addrs.v6addrs));
flow->control.addr_type = FLOW_DISSECTOR_KEY_IPV6_ADDRS;
}

View File

@@ -100,10 +100,8 @@ struct iphdr {
__u8 ttl;
__u8 protocol;
__sum16 check;
__struct_group(/* no tag */, addrs, /* no attrs */,
__be32 saddr;
__be32 daddr;
);
__be32 saddr;
__be32 daddr;
/*The options start here. */
};

View File

@@ -130,10 +130,8 @@ struct ipv6hdr {
__u8 nexthdr;
__u8 hop_limit;
__struct_group(/* no tag */, addrs, /* no attrs */,
struct in6_addr saddr;
struct in6_addr daddr;
);
struct in6_addr saddr;
struct in6_addr daddr;
};