On Mon, Sep 10, 2018 at 06:01:05PM +0200, Alexander Bluhm wrote: > On Mon, Sep 10, 2018 at 05:52:43PM +0200, Klemens Nanni wrote: > > On Mon, Sep 10, 2018 at 05:41:56PM +0200, Alexander Bluhm wrote: > > > I would prefer to access pfa.v6 than to rely on the fact that pf_addr > > > contains a union as the first field. And the memcpy() is eqivalent > > > to the following assignment as both structures are aligned. > > > > > > pfa.v6 = ((struct sockaddr_in6 *)sa)->sin6_addr; > > Agreed, except `pfa' is a pointer so rather `pfa->v6'. > > > > Works expected, OK with that? > > OK bluhm@ >
either way (memcpy() vs. bluhm's suggestion) is OK with me. sashan@