diff options
author | imarom <imarom@cisco.com> | 2016-12-25 12:54:09 +0200 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-12-25 13:50:56 +0200 |
commit | 34cb66c9f06c7a43e68a17b4a8802f8d34298a65 (patch) | |
tree | aa6b081213e5715cf09a18503cc7b0a20168c6fc /src/bp_sim.h | |
parent | 549f2750ab22db5695a8d29575c136ab06e37235 (diff) |
refactor layer config on prot attributes
added guard against unconfigured MAC when going up with empty config
file
Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'src/bp_sim.h')
-rwxr-xr-x | src/bp_sim.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bp_sim.h b/src/bp_sim.h index a41349d0..328820cd 100755 --- a/src/bp_sim.h +++ b/src/bp_sim.h @@ -635,7 +635,8 @@ private: typedef struct mac_align_t_ { uint8_t dest[6]; uint8_t src[6]; - uint8_t pad[4]; + uint8_t is_set; + uint8_t pad[3]; } mac_align_t ; struct CMacAddrCfg { @@ -643,6 +644,7 @@ public: CMacAddrCfg (){ memset(u.m_data,0,sizeof(u.m_data)); u.m_mac.dest[3]=1; + u.m_mac.is_set = 0; } union { mac_align_t m_mac; |