Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Cross-merge networking fixes after downstream PR (net-6.13-rc6).

No conflicts.

Adjacent changes:

include/linux/if_vlan.h
  f91a5b8089 ("af_packet: fix vlan_get_protocol_dgram() vs MSG_PEEK")
  3f330db306 ("net: reformat kdoc return statements")

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jakub Kicinski
2024-12-05 11:48:58 -08:00
342 changed files with 4605 additions and 1931 deletions

View File

@@ -538,10 +538,8 @@ static void *packet_current_frame(struct packet_sock *po,
return packet_lookup_frame(po, rb, rb->head, status);
}
static u16 vlan_get_tci(struct sk_buff *skb, struct net_device *dev)
static u16 vlan_get_tci(const struct sk_buff *skb, struct net_device *dev)
{
u8 *skb_orig_data = skb->data;
int skb_orig_len = skb->len;
struct vlan_hdr vhdr, *vh;
unsigned int header_len;
@@ -562,33 +560,21 @@ static u16 vlan_get_tci(struct sk_buff *skb, struct net_device *dev)
else
return 0;
skb_push(skb, skb->data - skb_mac_header(skb));
vh = skb_header_pointer(skb, header_len, sizeof(vhdr), &vhdr);
if (skb_orig_data != skb->data) {
skb->data = skb_orig_data;
skb->len = skb_orig_len;
}
vh = skb_header_pointer(skb, skb_mac_offset(skb) + header_len,
sizeof(vhdr), &vhdr);
if (unlikely(!vh))
return 0;
return ntohs(vh->h_vlan_TCI);
}
static __be16 vlan_get_protocol_dgram(struct sk_buff *skb)
static __be16 vlan_get_protocol_dgram(const struct sk_buff *skb)
{
__be16 proto = skb->protocol;
if (unlikely(eth_type_vlan(proto))) {
u8 *skb_orig_data = skb->data;
int skb_orig_len = skb->len;
skb_push(skb, skb->data - skb_mac_header(skb));
proto = __vlan_get_protocol(skb, proto, NULL);
if (skb_orig_data != skb->data) {
skb->data = skb_orig_data;
skb->len = skb_orig_len;
}
}
if (unlikely(eth_type_vlan(proto)))
proto = __vlan_get_protocol_offset(skb, proto,
skb_mac_offset(skb), NULL);
return proto;
}