equal
deleted
inserted
replaced
260 if (!rdsv3_capable_interface(&lifr)) |
260 if (!rdsv3_capable_interface(&lifr)) |
261 continue; |
261 continue; |
262 |
262 |
263 /* save the record */ |
263 /* save the record */ |
264 bcopy(lp, rlp, sizeof (struct lifreq)); |
264 bcopy(lp, rlp, sizeof (struct lifreq)); |
|
265 rlp->lifr_addr.ss_family = AF_INET_OFFLOAD; |
265 rlp++; |
266 rlp++; |
266 } |
267 } |
267 |
268 |
268 kmem_free(buf, bufsize); |
269 kmem_free(buf, bufsize); |
269 |
270 |
473 if (!rdsv3_capable_interface_old(&ifr)) |
474 if (!rdsv3_capable_interface_old(&ifr)) |
474 continue; |
475 continue; |
475 |
476 |
476 /* save the record */ |
477 /* save the record */ |
477 bcopy(lp, rlp, sizeof (struct ifreq)); |
478 bcopy(lp, rlp, sizeof (struct ifreq)); |
|
479 rlp->ifr_addr.sa_family = AF_INET_OFFLOAD; |
478 rlp++; |
480 rlp++; |
479 } |
481 } |
480 |
482 |
481 kmem_free(buf, bufsize); |
483 kmem_free(buf, bufsize); |
482 |
484 |
1140 rdsv3_verify_bind_address(ipaddr_t addr) |
1142 rdsv3_verify_bind_address(ipaddr_t addr) |
1141 { |
1143 { |
1142 return (1); |
1144 return (1); |
1143 } |
1145 } |
1144 |
1146 |
1145 /* XXX - need to enhance to compare IP address and port */ |
|
1146 int |
1147 int |
1147 rdsv3_bind_node_compare(const void *a, const void *b) |
1148 rdsv3_bind_node_compare(const void *a, const void *b) |
1148 { |
1149 { |
1149 uint16_be_t port = *(in_port_t *)a; |
1150 uint64_t needle = *(uint64_t *)a; |
1150 struct rdsv3_sock *rs = (struct rdsv3_sock *)b; |
1151 struct rdsv3_sock *rs = (struct rdsv3_sock *)b; |
1151 |
1152 |
1152 RDSV3_DPRINTF5("rdsv3_bind_node_compare", "Enter (%x %x)", port, |
1153 if (needle > (((uint64_t)rs->rs_bound_addr << 32) | rs->rs_bound_port)) |
1153 rs->rs_bound_port); |
|
1154 |
|
1155 if (port > rs->rs_bound_port) |
|
1156 return (+1); |
1154 return (+1); |
1157 else if (port < rs->rs_bound_port) |
1155 else if (needle < |
|
1156 (((uint64_t)rs->rs_bound_addr << 32) | rs->rs_bound_port)) |
1158 return (-1); |
1157 return (-1); |
1159 |
1158 |
1160 return (0); |
1159 return (0); |
1161 } |
1160 } |
1162 |
1161 |