Bug 1920 - Remove spaces from DSR attributes so can be re-loaded by config-store
Remove spaces from DSR attributes so can be re-loaded by config-store
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: dsr
ns-3-dev
All All
: P5 normal
Assigned To: Yufei Cheng
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-30 16:55 EDT by Scott Carpenter
Modified: 2014-06-06 17:33 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Carpenter 2014-05-30 16:55:01 EDT
I propose the following simple patch for src/dsr/model/dsr-option-header.cc




664,666c671,676
<                    MakeEnumChecker (NODE_UNREACHABLE, "Node unreachable",
 <                                     FLOW_STATE_NOT_SUPPORTED, "Flow state not supported",
<                                     OPTION_NOT_SUPPORTED, "Option not supported"))
---
>                    // note:  config-store (raw text) fails to parse upon
 >                    // loading of quoted string containing spaces, 
>                    // so have replaced spaces with underscore.
>                    MakeEnumChecker (NODE_UNREACHABLE, "Node_unreachable",
 >                                     FLOW_STATE_NOT_SUPPORTED, "Flow_state_not_supported",
>                                     OPTION_NOT_SUPPORTED, "Option_ not_supported"))





Issue:

I am writing a vanet simulation script, which includes DSR.  I am using config-store to save settings (raw text mode).  When I then try to read in the config file I just saved, I find that these settings fail to parse correctly, because they were written to the raw-text config-store file as quoted strings, which contained spaces.  The config-file read/parse then fails (NS_ASSERT) to re-load these saved settings.  My work-around is to simply replace the spaces with underscores in this attribute.
Comment 1 Tommaso Pecorella 2014-05-31 16:19:22 EDT
The attribute is part of an header, and it is never (ever) used.

The right bugfix is to remove the attribute altogether.

T.
Comment 2 Tommaso Pecorella 2014-06-06 17:33:53 EDT
changeset 10803	0279c409a48b