|
Bugzilla – Full Text Bug Listing |
| Summary: | L4 protocol sockets should support BindToNetDevice over IPv6 | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Tommaso Pecorella <tommaso.pecorella> |
| Component: | internet | Assignee: | Tommaso Pecorella <tommaso.pecorella> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | ns-bugs, tomh |
| Priority: | P5 | ||
| Version: | ns-3-dev | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | patch | ||
|
Description
Tommaso Pecorella
2014-01-05 08:17:53 UTC
Created attachment 1752 [details]
patch
The patch add the required BindToNetDevice calls to the IPv6Endpoint inside TCP and UDP sockets.
The only doubt I have is: if the socket wasn't already bound (normal Bind), BindToNetDevice will do it for the user.
BUT it will open *two* endpoints, v4 and v6.
Since we do have separate Bind and Bind6, and they open just the endpoint they need, maybe it's not a good idea to open another one just because we can.
SO, the BindToNetDevice "logical" thing would be: do nothing or raise an assert if the EndPoint is not already bound by a previous Bind.
This also prevents the idiotic error: call BindToNetDevice() and, after call Bind() (it's causing a a memory leak).
Opinions ?
I'm OK with this also, as long as there is some documentation added about the expected sequence of Bind() calls supported. added in changeset: 10933:7442f5603ef4 |