append the interface index instead of throwing an exception when the scope id lookup...
authorEli Lindsey <elindsey@fb.com>
Wed, 19 Jul 2017 15:51:26 +0000 (08:51 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 19 Jul 2017 16:12:07 +0000 (09:12 -0700)
commit8114790f8c8ca40bb1c649866d8ffd09a1585d23
tree009e7bdaa2d0dc786ca979ea936e8ad3c5cf6f06
parent3d63fc96530e972d519d08cb380e81b5db147a17
append the interface index instead of throwing an exception when the scope id lookup fails

Summary: As written, this str() method depends on the current state of the host - if an interface disappears (as is commong with eg. mobile, ipsec, etc.) then attempting to generate a string representation of this v6 address will currently throw an exception. Instead, we're going toignore the lookup failure and append the index i; this form is interchangeable, though slightly less legible.

Reviewed By: yfeldblum

Differential Revision: D5443618

fbshipit-source-id: bbd3b4edaee8098671140af7400377d5e2b1937b
folly/IPAddressV6.cpp
folly/test/IPAddressTest.cpp