Skip to content

Commit

Permalink
Merge pull request snabbco#722 from dpino/revert-remove-end-addr
Browse files Browse the repository at this point in the history
Revert "Remove end-addr in psid-map"
  • Loading branch information
dpino authored Jan 20, 2017
2 parents ccbdc57 + fd46085 commit 57b438d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/apps/lwaftr/binding_table.lua
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ function load(conf)
'psid_length '..psid_length..' + shift '..shift..
' should not exceed 16')
psid_value.psid_length, psid_value.shift = psid_length, shift
psid_builder:add_range(k.addr, k.addr, psid_value)
psid_builder:add_range(k.addr, v.end_addr or k.addr, psid_value)
end
local psid_map = psid_builder:build(psid_map_value_t())
return BindingTable.new(psid_map, conf.br_address, conf.softwire)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,10 @@ local function migrate_conf(old)
local psid_map = cltable.new({ key_type = psid_key_t })
for addr, end_addr, params in old_bt.psid_map:iterate() do
local reserved_ports_bit_count = 16 - params.psid_length - params.shift
if end_addr == addr then end_addr = nil end
if reserved_ports_bit_count ~= 16 then
psid_map[psid_key_t(addr)] = {
end_addr = end_addr,
psid_length = params.psid_length,
shift = params.shift,
reserved_ports_bit_count = reserved_ports_bit_count
Expand Down

0 comments on commit 57b438d

Please sign in to comment.