nice if the server is in a chrooted environment (no /etc/protocols,
server code using hardcorded protocol numbers like 6 for tcp),
suggested by John Holdsworth <coldwave@bigfoot.com>.
In other words, if we are given a number, why look it up again
(by number)?
p4raw-id: //depot/perl@11957
$port = $1
if(defined $addr && $addr =~ s,:([\w\(\)/]+)$,,);
- if(defined $proto) {
- if (@proto = ( $proto =~ m,\D,
- ? getprotobyname($proto)
- : getprotobynumber($proto))
- ) {
+ if(defined $proto && $proto =~ /\D/) {
+ if(@proto = getprotobyname($proto) {
$proto = $proto[2] || undef;
}
else {