diff options
| author | Mark Brown <broonie@kernel.org> | 2023-05-24 11:01:38 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2023-05-24 11:01:38 +0100 |
| commit | 6c594a820f8fa5ec3619715e32ff5314852ee26b (patch) | |
| tree | 040d56294ccf00202e1820cb3784317034f5c839 /net/nsh/nsh.c | |
| parent | e6beda565b2b1084f9a2cca5c73ae08f1e58c34e (diff) | |
| parent | 44c026a73be8038f03dbdeef028b642880cf1511 (diff) | |
regulator: Merge up v6.4-rc3
Merge up v6.4-rc3 in order to get fixes to improve the stability of my
CI.
Diffstat (limited to 'net/nsh/nsh.c')
| -rw-r--r-- | net/nsh/nsh.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/nsh/nsh.c b/net/nsh/nsh.c index e9ca007718b7..0f23e5e8e03e 100644 --- a/net/nsh/nsh.c +++ b/net/nsh/nsh.c @@ -77,13 +77,12 @@ static struct sk_buff *nsh_gso_segment(struct sk_buff *skb, netdev_features_t features) { struct sk_buff *segs = ERR_PTR(-EINVAL); + u16 mac_offset = skb->mac_header; unsigned int nsh_len, mac_len; __be16 proto; - int nhoff; skb_reset_network_header(skb); - nhoff = skb->network_header - skb->mac_header; mac_len = skb->mac_len; if (unlikely(!pskb_may_pull(skb, NSH_BASE_HDR_LEN))) @@ -108,15 +107,14 @@ static struct sk_buff *nsh_gso_segment(struct sk_buff *skb, segs = skb_mac_gso_segment(skb, features); if (IS_ERR_OR_NULL(segs)) { skb_gso_error_unwind(skb, htons(ETH_P_NSH), nsh_len, - skb->network_header - nhoff, - mac_len); + mac_offset, mac_len); goto out; } for (skb = segs; skb; skb = skb->next) { skb->protocol = htons(ETH_P_NSH); __skb_push(skb, nsh_len); - skb_set_mac_header(skb, -nhoff); + skb->mac_header = mac_offset; skb->network_header = skb->mac_header + mac_len; skb->mac_len = mac_len; } |
