|
Bugzilla – Full Text Bug Listing |
| Summary: | BindToNetDevice not working for IPv6 sockets | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Tommaso Pecorella <tommaso.pecorella> |
| Component: | ipv6 | Assignee: | Tommaso Pecorella <tommaso.pecorella> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | ns-bugs, tomh |
| Priority: | P3 | ||
| Version: | ns-3-dev | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: |
IPv6 Sockets should now obey to BindToNetDevice
New patch, removed not needed functions Test program for Raw v6 sockets |
||
|
Description
Tommaso Pecorella
2012-11-11 10:19:45 UTC
Created attachment 1464 [details]
IPv6 Sockets should now obey to BindToNetDevice
Half-drycoded patch.
The IPv6RawSockets one has been tested and it works.
The TCP and UDP Sockets should work as the new code mimics the Ipv4 approach (i.e., do it in the EndPoint demux).
Created attachment 1465 [details]
New patch, removed not needed functions
Created attachment 1470 [details]
Test program for Raw v6 sockets
Without the patch:
21:40:32:~/Development/workspace/ns-3-dev pecos$ ./waf --run scratch/BindTestv6
Waf: Entering directory `/Users/pecos/Development/workspace/ns-3-dev/build'
Waf: Leaving directory `/Users/pecos/Development/workspace/ns-3-dev/build'
'build' finished successfully (2.781s)
Socket 0x7ff891c7a740 - Received a packet from 2001:0001:0000:0000:0200:00ff:fe00:0001, pointer 0x7ff891c75cb0, size 192, content ns3::Ipv6Header ((Version 6 Traffic class 0x0 Flow Label 0x0 Payload Length 136 Next Header 17 Hop Limit 64 )2001:0001:0000:0000:0200:00ff:fe00:0001 > ff01:0000:0000:0000:0000:0000:0000:0001) ns3::UdpHeader (length: 136 49153 > 9) Payload (size=128)
Socket 0x7ff891c7a830 - Received a packet from 2001:0001:0000:0000:0200:00ff:fe00:0001, pointer 0x7ff891c75cb0, size 192, content ns3::Ipv6Header ((Version 6 Traffic class 0x0 Flow Label 0x0 Payload Length 136 Next Header 17 Hop Limit 64 )2001:0001:0000:0000:0200:00ff:fe00:0001 > ff01:0000:0000:0000:0000:0000:0000:0001) ns3::UdpHeader (length: 136 49153 > 9) Payload (size=128)
Socket 0x7ff891c7a940 - Received a packet from 2001:0001:0000:0000:0200:00ff:fe00:0001, pointer 0x7ff891c75cb0, size 192, content ns3::Ipv6Header ((Version 6 Traffic class 0x0 Flow Label 0x0 Payload Length 136 Next Header 17 Hop Limit 64 )2001:0001:0000:0000:0200:00ff:fe00:0001 > ff01:0000:0000:0000:0000:0000:0000:0001) ns3::UdpHeader (length: 136 49153 > 9) Payload (size=128)
Socket 0x7ff891c7a740 - Received a packet from 2001:0001:0000:0000:0200:00ff:fe00:0001, pointer 0x7ff891c7eff0, size 192, content ns3::Ipv6Header ((Version 6 Traffic class 0x0 Flow Label 0x0 Payload Length 136 Next Header 17 Hop Limit 64 )2001:0001:0000:0000:0200:00ff:fe00:0001 > ff01:0000:0000:0000:0000:0000:0000:0001) ns3::UdpHeader (length: 136 49153 > 9) Payload (size=128)
Socket 0x7ff891c7a830 - Received a packet from 2001:0001:0000:0000:0200:00ff:fe00:0001, pointer 0x7ff891c7eff0, size 192, content ns3::Ipv6Header ((Version 6 Traffic class 0x0 Flow Label 0x0 Payload Length 136 Next Header 17 Hop Limit 64 )2001:0001:0000:0000:0200:00ff:fe00:0001 > ff01:0000:0000:0000:0000:0000:0000:0001) ns3::UdpHeader (length: 136 49153 > 9) Payload (size=128)
Socket 0x7ff891c7a940 - Received a packet from 2001:0001:0000:0000:0200:00ff:fe00:0001, pointer 0x7ff891c7eff0, size 192, content ns3::Ipv6Header ((Version 6 Traffic class 0x0 Flow Label 0x0 Payload Length 136 Next Header 17 Hop Limit 64 )2001:0001:0000:0000:0200:00ff:fe00:0001 > ff01:0000:0000:0000:0000:0000:0000:0001) ns3::UdpHeader (length: 136 49153 > 9) Payload (size=128)
21:55:32:~/Development/workspace/ns-3-dev pecos$
6 packets, bad.
21:56:07:~/Development/workspace/ns-3-dev pecos$ ./waf --run scratch/BindTestv6
Waf: Entering directory `/Users/pecos/Development/workspace/ns-3-dev/build'
Waf: Leaving directory `/Users/pecos/Development/workspace/ns-3-dev/build'
'build' finished successfully (2.793s)
Socket 0x7fb7d847a830 - Received a packet from 2001:0001:0000:0000:0200:00ff:fe00:0001, pointer 0x7fb7d8475cb0, size 192, content ns3::Ipv6Header ((Version 6 Traffic class 0x0 Flow Label 0x0 Payload Length 136 Next Header 17 Hop Limit 64 )2001:0001:0000:0000:0200:00ff:fe00:0001 > ff01:0000:0000:0000:0000:0000:0000:0001) ns3::UdpHeader (length: 136 49153 > 9) Payload (size=128)
Socket 0x7fb7d847a830 - Received a packet from 2001:0001:0000:0000:0200:00ff:fe00:0001, pointer 0x7fb7d8475cb0, size 192, content ns3::Ipv6Header ((Version 6 Traffic class 0x0 Flow Label 0x0 Payload Length 136 Next Header 17 Hop Limit 64 )2001:0001:0000:0000:0200:00ff:fe00:0001 > ff01:0000:0000:0000:0000:0000:0000:0001) ns3::UdpHeader (length: 136 49153 > 9) Payload (size=128)
21:56:23:~/Development/workspace/ns-3-dev pecos$
2 packets, better.
Since I'm the Ipv6 maintainer I could auto-approve the patch, however I'll wait for comments since this patch goes hand-in-hand with bug #1527 and I feel like they should be both applied at the same time. T. (In reply to comment #4) > Since I'm the Ipv6 maintainer I could auto-approve the patch, however I'll > wait for comments since this patch goes hand-in-hand with bug #1527 and I > feel like they should be both applied at the same time. > > T. +1 to both Fixed in changeset 9148 - 9c37ec6053bd |