Bug 1920

Summary: Remove spaces from DSR attributes so can be re-loaded by config-store
Product: ns-3 Reporter: Scott Carpenter <scarpen>
Component: dsrAssignee: Yufei Cheng <michaelcheng1943>
Status: RESOLVED FIXED    
Severity: normal CC: ns-bugs, tommaso.pecorella
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   

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