-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alignment Problem on ARM #86
base: master
Are you sure you want to change the base?
Conversation
bytes are written replacing * operator with memcpy fixes the issue
Hm, the pointers point to uint32 in non-packed struct as far as I can see. How should the alignment get screwed here? |
i didn't checked why the alignment is screwed i'm using openvpn as a client with client-nat on an arm platform i'm in holiday this week but i remember what happened a ping with tcpdump and 2.3.11 looks like this IP 1.2.3.4 > 5.6.7.8: ICMP echo request after upgrade to 2.4.0 it was translated to this i loaded openvpn in gdb and checked the address of addr_ptr in client_nat_transform so maybe the fix has to be made somewhere else if it helps i can have a look at the generated assembler code and check how the address in addr_ptr ist used |
The syntax of --client-nat has changed , possibly this is related. |
the config is pushed from the server like this PUSH: Received control message: 'PUSH_REPLY,route 172.16.0.1,topology net30,ping 50,ping-restart 110,client-nat snat 10.100.101.0 255.255.255.0 10.10.0.0,route 172.16.0.0 255.255.192.0,ifconfig 172.16.0.50 172.16.0.49' |
anybody knows if this is still a problem? Many people run openvpn on arm (including myself) and unaligned access was never reported. (But not sure who uses client-nat) |
Hi,
On Sat, Sep 17, 2022 at 06:02:52AM -0700, Antonio Quartulli wrote:
anybody knows if this is still a problem? Many people run openvpn on arm (including myself) and unaligned access was never reported. (But not sure who uses client-nat)
I think ARM has no general problem with unaligned access, this smells
more like structure padding / rounding errors in the client-nat code.
But, someone would need to actually test openvpn with client-nat on ARM
(old and new...) to see if this problem still persists. Volunteers? ;-)
gert
…--
"If was one thing all people took for granted, was conviction that if you
feed honest figures into a computer, honest figures come out. Never doubted
it myself till I met a computer with a sense of humor."
Robert A. Heinlein, The Moon is a Harsh Mistress
Gert Doering - Munich, Germany ***@***.***
|
if the address in addr_ptr is not aligned correctly, the wrong bytes are written on arm
replacing * operator with memcpy fixes the issue
Thank you for your contribution
You are welcome to open PR, but they are used for discussion only. All
patches must eventually go to the openvpn-devel mailing list for review:
Please send your patch using git-send-email. For example to send your latest commit to the list:
For details, see these Wiki articles: