- sprintf(addrstr,"%08lX",(long)addr.sin_addr.s_addr);
- sprintf(portstr,"%04X",addr.sin_port);
+ switch (addr.sa.sa_family) {
+ case AF_INET:
+ sprintf(addrstr,"%08lX",(long)addr.sin.sin_addr.s_addr);
+ sprintf(portstr,"%04X",addr.sin.sin_port);
+ break;
+ default:
+ fatal("udp (%s:%d): unsupported address family for authbind",
+ st->loc.file,st->loc.line);
+ }