cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/900?usp=email )
Change subject: dco-win: simplify control packets prepend code ...................................................................... dco-win: simplify control packets prepend code Eliminate unneeded temporary struct sockaddr_in buffer. Change-Id: Ie57f7b11157ab5ca8ff01e1c4f03a308117ff937 Signed-off-by: Lev Stipakov <[email protected]> Acked-by: Gert Doering <[email protected]> Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg30942.html Signed-off-by: Gert Doering <[email protected]> --- M src/openvpn/socket.h 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/openvpn/socket.h b/src/openvpn/socket.h index c370f2c..2c33319 100644 --- a/src/openvpn/socket.h +++ b/src/openvpn/socket.h @@ -1125,15 +1125,11 @@ { if (to->dest.addr.sa.sa_family == AF_INET) { - struct sockaddr_in sa; - memcpy(&sa, &to->dest.addr.in4, sizeof(sa)); - buf_write_prepend(buf, &sa, sizeof(sa)); + buf_write_prepend(buf, &to->dest.addr.in4, sizeof(struct sockaddr_in)); } else { - struct sockaddr_in6 sa; - memcpy(&sa, &to->dest.addr.in6, sizeof(sa)); - buf_write_prepend(buf, &sa, sizeof(sa)); + buf_write_prepend(buf, &to->dest.addr.in6, sizeof(struct sockaddr_in6)); } } -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/900?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: Ie57f7b11157ab5ca8ff01e1c4f03a308117ff937 Gerrit-Change-Number: 900 Gerrit-PatchSet: 2 Gerrit-Owner: stipa <[email protected]> Gerrit-Reviewer: cron2 <[email protected]> Gerrit-Reviewer: flichtenheld <[email protected]> Gerrit-Reviewer: plaisthos <[email protected]> Gerrit-CC: openvpn-devel <[email protected]> Gerrit-MessageType: merged
_______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
