HomeFreeBSD

gif(4): Revert in{,6}_gif_output() misalignment handling

Description

gif(4): Revert in{,6}_gif_output() misalignment handling

The code added in c89c8a1029860182eece5d51ec09119b9500e5a1 in order
to compensate possible misalignment caused by prepending the IP4/6
header with an EtherIP one got broken at some point by a rewrite of
gif(4). For better or worse, 8018ac153f7671699ca008f31c0fad9caef2f531
relaxed the alignment of struct ip from 32 bit to 16 bit, though. As
a result, a 16 bit offset of the IPv4 header induced by the addition
of the 16 bit EtherIP one no longer is a problem in the first place.
The alignment of struct ip6_hdr currently is even only 8 bit, making
it even less problematic with regards to possible misalignment.
Thus, remove the code for handling misalignment in in{,6}_gif_output()
altogether again.
While at it, replace the 3 bcopy(9) calls in gif(4) with memcpy(9) as
there's no need to handle overlap here.

(cherry picked from commit e82d7b2952afaf9625a3d7b05d03c43c1d3e7d9c)

Details

Provenance
mariusAuthored on Jul 19 2023, 5:17 PM
Parents
rG6063ec2f429d: xhci(4): Describe AMD 400 Series USB 3.1 controllers
Branches
Unknown
Tags
Unknown