@@ -200,7 +200,7 @@ func (s *ServiceTable) QueryCustomService(epcID int32, isIPv6 bool, ipv4 uint32,
200200 return 0
201201 }
202202 serviceID := s .customServiceIpv6Table [genEpcIDIPv6Key (epcID , ipv6 , 0 , serverPort )]
203- if serviceID > 0 || serverPort == 0 {
203+ if serviceID > 0 {
204204 return serviceID
205205 }
206206 serviceID = s .customServiceIpv6Table [genEpcIDIPv6Key (epcID , ipv6 , 0 , 0 )]
@@ -209,7 +209,7 @@ func (s *ServiceTable) QueryCustomService(epcID int32, isIPv6 bool, ipv4 uint32,
209209 }
210210 // thirdly query without epc
211211 serviceID = s .customServiceIpv6Table [genEpcIDIPv6Key (0 , ipv6 , 0 , serverPort )]
212- if serviceID > 0 || serverPort == 0 {
212+ if serviceID > 0 {
213213 return serviceID
214214 }
215215 // fourthly query without epc/port
@@ -219,7 +219,7 @@ func (s *ServiceTable) QueryCustomService(epcID int32, isIPv6 bool, ipv4 uint32,
219219 return 0
220220 }
221221 serviceID := s .customServiceIpv4Table [genEpcIDIPv4Key (epcID , ipv4 , serverPort )]
222- if serviceID > 0 || serverPort == 0 {
222+ if serviceID > 0 {
223223 return serviceID
224224 }
225225 serviceID = s .customServiceIpv4Table [genEpcIDIPv4Key (epcID , ipv4 , 0 )]
@@ -228,7 +228,7 @@ func (s *ServiceTable) QueryCustomService(epcID int32, isIPv6 bool, ipv4 uint32,
228228 }
229229 // thirdly query without epc
230230 serviceID = s .customServiceIpv4Table [genEpcIDIPv4Key (0 , ipv4 , serverPort )]
231- if serviceID > 0 || serverPort == 0 {
231+ if serviceID > 0 {
232232 return serviceID
233233 }
234234 // fourthly query without epc/port
0 commit comments