Bug 1704 - IPv6 addresses State are not handled correctly
IPv6 addresses State are not handled correctly
Status: PATCH WANTED
Product: ns-3
Classification: Unclassified
Component: ipv6
ns-3-dev
All All
: P5 enhancement
Assigned To: Tommaso Pecorella
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-16 07:21 EDT by Tommaso Pecorella
Modified: 2016-05-07 18:56 EDT (History)
3 users (show)

See Also:


Attachments
Fix for 1) (4.81 KB, patch)
2016-05-07 18:56 EDT, Max Schettler
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tommaso Pecorella 2013-06-16 07:21:44 EDT
Iv6Addresses can have different States:
  enum State_e
  {
    TENTATIVE, /**< Address is tentative, no packet can be sent unless DAD finished */
    DEPRECATED, /**< Address is deprecated and should not be used */
    PREFERRED, /**< Preferred address */
    PERMANENT, /**< Permanent address */
    HOMEADDRESS, /**< Address is a HomeAddress */
    TENTATIVE_OPTIMISTIC, /**< Address is tentative but we are optimistic so we can send packet even if DAD is not yet finished */
    INVALID, /**< Invalid state (after a DAD failed) */
  };

The state transition is handled (i.e., an address starts at TENTATIVE_OPTIMISTIC, after the DAD is switched to PREFERRED, etc.).

The problems with the current implementation are:
1) Address state is not checked when the address is used, i.e., a node can use a DEPRECATED or INVALID address.
2) There is no fallback action when an address is marked as "to not be used". As a result, a node might not have any usable address.

This issue is partially related with the way the addresses are generated. Right now only a carefully built simulation might trigger this problem.
Nevertheless this might become an issue with the fd-netdevice.
Comment 1 Saswat K. Mishra 2015-04-21 15:35:50 EDT
Is this bug still open for patching???
Comment 2 Tommaso Pecorella 2015-04-22 04:14:53 EDT
(In reply to Saswat K. Mishra from comment #1)
> Is this bug still open for patching???

Yes, the bug is open and needing a patch.
Comment 3 Max Schettler 2016-05-07 18:56:43 EDT
Created attachment 2415 [details]
Fix for 1)

This patch should fix at least 1). As for 2) I'm not sure what you mean by "not to be used". Isn't the interface having no valid address a situation that can occur and should therefore be simulated as well?