diff --git a/rebar.config b/rebar.config index 51da29a..300e591 100644 --- a/rebar.config +++ b/rebar.config @@ -3,6 +3,6 @@ {lager_extra_sinks, [netlink]}]}. {deps, [ - {lager, ".*", {git, "git://github.com/basho/lager", {tag, "3.2.1"}}}, - {gen_socket, ".*", {git, "git://github.com/travelping/gen_socket", "master"}} + {lager, ".*", {git, "https://github.com/erlang-lager/lager", {tag, "3.9.2"}}}, + {gen_socket, ".*", {git, "https://github.com/osmocom/gen_socket", {branch, "pespin/master"}}} ]}. diff --git a/src/netlink.erl b/src/netlink.erl index 51efc33..3055320 100644 --- a/src/netlink.erl +++ b/src/netlink.erl @@ -845,7 +845,7 @@ nl_dec_payload(_Type, done, << Length:32/native-integer >>) -> Length; %% Error -nl_dec_payload(_Type, error, <>) -> +nl_dec_payload(_Type, error, <>) -> {Error, Msg}; nl_dec_payload(ctnetlink, _MsgType, << Family:8, Version:8, ResId:16/native-integer, Data/binary >>) -> @@ -974,7 +974,7 @@ nl_ct_dec(_Protocol, << >>, Acc) -> lists:reverse(Acc). is_rt_dump(Type, Flags) -> - (Type band 3) =:= 2 andalso Flags band ?NLM_F_DUMP =/= 0. + (Type band 3) =:= 2 andalso Flags band ?NLM_F_DUMP =:= ?NLM_F_DUMP. -spec nl_rt_dec(binary()) -> [{'error',_} | #rtnetlink{}]. nl_rt_dec(Msg) -> diff --git a/src/netlink_decoder_gen.hrl b/src/netlink_decoder_gen.hrl index 51d587a..b838659 100644 --- a/src/netlink_decoder_gen.hrl +++ b/src/netlink_decoder_gen.hrl @@ -2660,6 +2660,9 @@ decode_linkinfo_gtp(_Family, 2, Value) -> decode_linkinfo_gtp(_Family, 3, Value) -> {hashsize, decode_huint32(Value)}; +decode_linkinfo_gtp(_Family, 4, Value) -> + {role, decode_huint32(Value)}; + decode_linkinfo_gtp(_Family, Id, Value) -> {Id, Value}. @@ -5374,6 +5377,9 @@ encode_linkinfo_gtp(_Family, {fd1, Value}) -> encode_linkinfo_gtp(_Family, {hashsize, Value}) -> encode_huint32(3, Value); +encode_linkinfo_gtp(_Family, {role, Value}) -> + encode_huint32(4, Value); + encode_linkinfo_gtp(_Family, {Type, Value}) when is_integer(Type), is_binary(Value) -> enc_nla(Type, Value).