[Swan-dev] formatting endpoints

Andrew Cagney andrew.cagney at gmail.com
Thu Jan 3 14:52:35 UTC 2019


Currently endpoints are formatted as:

    ADDRESS:PORT
vis:
    1::1:500
    1.0.0.1:500

but for IPv6 the correct format is

    [ADDRESS]:PORT
vis:
    [1::1]:500

While fixing this is straight forward - a function to format the pair
- there is an edge case (isn't there always).  Consider this log line:

  initiate on demand from 1::1:8 to 2::2:0 proto=1 because: acquire

since PORT is zero, which presumably means all ports, should it be formatted as:

  initiate on demand from [1::1]:8 to 2::2 proto=1 because: acquire

Andrew


More information about the Swan-dev mailing list