Attention is currently required from: flichtenheld, plaisthos. cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/827?usp=email )
Change subject: forward: Fix potential unaligned access in drop_if_recursive_routing ...................................................................... Patch Set 1: Code-Review-1 (2 comments) File src/openvpn/forward.c: http://gerrit.openvpn.net/c/openvpn/+/827/comment/70a6dbae_af15a5b9 : PS1, Line 1406: memcpy(&pip, BPTR(buf) + ip_hdr_offset, sizeof(struct openvpn_iphdr)); I don't like that. We're in the per-packet fast path here, and this is executed for every single packet - so we shouldn't memcpy() the whole I header around. I'd suggest doing a `memcmp(pip->daddr, ..., sizeof(pip->daddr))`. That should be of similar cost. http://gerrit.openvpn.net/c/openvpn/+/827/comment/d54bde03_5397571d : PS1, Line 1432: if (IN6_ARE_ADDR_EQUAL(&tun_sa.addr.in6.sin6_addr, &pip6.daddr)) This is doing the `memcmp()` already, so we should be fine here... ``` #define IN6_ARE_ADDR_EQUAL(a, b) \ (memcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof(struct in6_addr)) == 0) ``` -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/827?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I74a9eec4954f3f9d208792b6b34357571f76ae4c Gerrit-Change-Number: 827 Gerrit-PatchSet: 1 Gerrit-Owner: flichtenheld <fr...@lichtenheld.com> Gerrit-Reviewer: cron2 <g...@greenie.muc.de> Gerrit-Reviewer: plaisthos <arne-open...@rfc2549.org> Gerrit-CC: openvpn-devel <openvpn-devel@lists.sourceforge.net> Gerrit-Attention: plaisthos <arne-open...@rfc2549.org> Gerrit-Attention: flichtenheld <fr...@lichtenheld.com> Gerrit-Comment-Date: Wed, 11 Dec 2024 14:23:26 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
_______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel