ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/sockinfo.C
(Generate patch)

Comparing gvpe/src/sockinfo.C (file contents):
Revision 1.24 by root, Tue Feb 8 23:11:36 2011 UTC vs.
Revision 1.25 by root, Thu Mar 24 21:52:49 2011 UTC

127u8 127u8
128sockinfo::supported_protocols (conf_node *conf) 128sockinfo::supported_protocols (conf_node *conf)
129{ 129{
130 u8 protocols = prot; 130 u8 protocols = prot;
131 131
132 if (prot & (PROT_UDPv4 | PROT_TCPv4)) 132 if (prot & (PROT_IPv4 | PROT_ICMPv4 | PROT_UDPv4 | PROT_TCPv4))
133 protocols |= PROT_IPv4 | PROT_ICMPv4; 133 protocols |= PROT_IPv4 | PROT_ICMPv4;
134 134
135 if (conf
136 && prot & PROTv4 135 if (conf && prot & PROTv4)
137 && conf->protocols & PROT_UDPv4 136 {
138 && conf->udp_port) 137 if (conf->protocols & PROT_UDPv4 && conf->udp_port)
139 protocols |= PROT_UDPv4; 138 protocols |= PROT_UDPv4;
140 139
141 if (conf 140 if (conf->protocols & PROT_TCPv4 && conf->tcp_port)
142 && prot & PROTv4
143 && conf->protocols & PROT_TCPv4
144 && conf->tcp_port)
145 protocols |= PROT_TCPv4; 141 protocols |= PROT_TCPv4;
146 142
147 if (conf 143 if (conf->protocols & PROT_DNSv4 && conf->dns_port)
148 && prot & PROTv4
149 && conf->protocols & PROT_DNSv4
150 && conf->dns_port)
151 protocols |= PROT_DNSv4; 144 protocols |= PROT_DNSv4;
145 }
152 146
153 return protocols; 147 return protocols;
154} 148}
155 149
156bool 150bool

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines