mos-stack / mOS-networking-stack

A Specialized Network Programming Library for Stateful Middleboxes:
http://mos.kaist.edu
Other
103 stars 21 forks source link

Fix issue introduced by 05e3289 #16

Closed tbarbette closed 6 years ago

tbarbette commented 6 years ago

I had a lot of lines in the NAT like [translate_addr: 144] mtcp_getpeer() failed sock=61 side=1 since that commit.

In nat.c, MOS_SIDE_CLI has been changed by MOS_SIDE_BOTH, without changing the length of the sockaddr len. Actually, by luck up to this patch the size of a pointer * 2 was equal to the size of a sockaddr, but now the error in the sizeof appears.

I suspect this also happens in midstat.c, but I don't have time to push this further.

ajamshed commented 6 years ago

Thanks for reporting the issue. We'll analyze the code and merge your fix soon.