When rendering the routename() or netname() of a struct sockaddr
authorChris Pressey <cpressey@dragonflybsd.org>
Wed, 16 Mar 2005 04:47:00 +0000 (04:47 +0000)
committerChris Pressey <cpressey@dragonflybsd.org>
Wed, 16 Mar 2005 04:47:00 +0000 (04:47 +0000)
commit00e3c5527eb38e6ef02c303cc8f4d07e654a2f44
treee4d19a2dd3b344d0d23730cfa61715461678ea10
parent937f5bb981a58a70e50c474a187a7082880af143
When rendering the routename() or netname() of a struct sockaddr
with an unknown address family, use a more straightforward loop
for dumping the contents of sa_data as hex:

- start at sa_data, end at sa + sa_len (NOT sa_data + sa_len);
- don't make assumptions about the size of u_short.

Inspired-by-patch-by: Sepherosa Ziehau <sepherosa_at_softhome_dot_net>
sbin/route/route.c