Skip to content

Commit

Permalink
add new rtnetlink values, so tests work under docker
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Cormack <[email protected]>
  • Loading branch information
justincormack committed Dec 13, 2015
1 parent 22604b8 commit 7540b04
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions syscall/linux/constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,10 @@ c.RTA = strflag {
MP_ALGO = 14,
TABLE = 15,
MARK = 16,
MFC_STATS = 17,
VIA = 18,
NEWDST = 19,
PREF = 20,
}

-- route flags
Expand Down
4 changes: 4 additions & 0 deletions syscall/linux/nl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ local rta_decode = {
ir.cacheinfo = t.rta_cacheinfo()
ffi.copy(ir.cacheinfo, buf, s.rta_cacheinfo)
end,
[c.RTA.PREF] = function(ir, buf, len)
local i = pt.uint8(buf)
ir.pref = tonumber(i[0])
end,
-- TODO some missing
}

Expand Down

0 comments on commit 7540b04

Please sign in to comment.