* update the inp_vflags on an endpoint */
| 5259 | * update the inp_vflags on an endpoint |
| 5260 | */ |
| 5261 | static void |
| 5262 | sctp_update_ep_vflag(struct sctp_inpcb *inp) |
| 5263 | { |
| 5264 | struct sctp_laddr *laddr; |
| 5265 | |
| 5266 | /* first clear the flag */ |
| 5267 | inp->ip_inp.inp.inp_vflag = 0; |
| 5268 | /* set the flag based on addresses on the ep list */ |
| 5269 | LIST_FOREACH(laddr, &inp->sctp_addr_list, sctp_nxt_addr) { |
| 5270 | if (laddr->ifa == NULL) { |
| 5271 | SCTPDBG(SCTP_DEBUG_PCB1, "%s: NULL ifa\n", |
| 5272 | __func__); |
| 5273 | continue; |
| 5274 | } |
| 5275 | |
| 5276 | if (laddr->ifa->localifa_flags & SCTP_BEING_DELETED) { |
| 5277 | continue; |
| 5278 | } |
| 5279 | switch (laddr->ifa->address.sa.sa_family) { |
| 5280 | #ifdef INET6 |
| 5281 | case AF_INET6: |
| 5282 | inp->ip_inp.inp.inp_vflag |= INP_IPV6; |
| 5283 | break; |
| 5284 | #endif |
| 5285 | #ifdef INET |
| 5286 | case AF_INET: |
| 5287 | inp->ip_inp.inp.inp_vflag |= INP_IPV4; |
| 5288 | break; |
| 5289 | #endif |
| 5290 | default: |
| 5291 | break; |
| 5292 | } |
| 5293 | } |
| 5294 | } |
| 5295 | |
| 5296 | /* |
| 5297 | * Add the address to the endpoint local address list There is nothing to be |
no outgoing calls
no test coverage detected