Skip to content

Commit

Permalink
fix service normalization in NAPTR records from DNS
Browse files Browse the repository at this point in the history
The normalize service field is supposed to be ordset. The
normalization instead produced an unsort list. The datatype
itself is the same (a list), but the set operations will not
work as expected on the unsorted list.
  • Loading branch information
RoadRunnr committed Nov 25, 2021
1 parent 325ec52 commit e832dcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/ergw_core/src/ergw_inet_res.erl
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ tggp_protocol(List) when is_list(List) ->

normalize_naptr_services(Services) ->
[Service | Protocols] = string:tokens(Services, ":"),
[{tggp_service(Service), tggp_protocol(P)} || P <- Protocols].
ordsets:from_list([{tggp_service(Service), tggp_protocol(P)} || P <- Protocols]).

normalize_rr(in, naptr, {Order, Pref, Flag, Services, RegExp, Host}, RR)
when is_list(Host), is_list(RegExp) ->
Expand Down

0 comments on commit e832dcf

Please sign in to comment.