Bug 1582 - IPv6 raw socket return value is not like Linux socket
IPv6 raw socket return value is not like Linux socket
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: ipv6
pre-release
PC Linux
: P5 major
Assigned To: Tommaso Pecorella
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-09 09:19 UTC by Hajime Tazaki
Modified: 2013-02-14 13:38 UTC (History)
1 user (show)

See Also:


Attachments
Fix the return value of IPv6 raw socket (964 bytes, application/octet-stream)
2013-02-09 09:19 UTC, Hajime Tazaki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hajime Tazaki 2013-02-09 09:19:03 UTC
Created attachment 1509 [details]
Fix the return value of IPv6 raw socket

Some applications use return values from socket call to check whether the data is correctly sent/received. The attached trivial patchset fixes the issue of the returned value when IPv6 raw socket is used, packet size and source address of the packet.

The patch was tested with test.py (-g as well) under changeset: 9232:0958cf37fa89.
Comment 1 Tommaso Pecorella 2013-02-11 16:33:04 UTC
+1 for the changes, however the patch does fix two separate bugs.

1) in the Send (and SendTo) the return value is incorrect.
2) in the Recv (and RecvFrom) the fromAddress parameter is not set if the packet is larger than maxSize.

I don't know if it's better to commit two changes or just one. Anyway, I'm positive with both changes. Feel free to push 'em.

Cheers,

T.
Comment 2 Hajime Tazaki 2013-02-12 05:27:17 UTC
Thanks Tommasso.
I've pushed "a" single patchset with an additional test-case to detect them.

changeset: 9236:3c5ea0bd869f