| 557 | * Set noinline to be dtrace-friendly |
| 558 | */ |
| 559 | static __noinline struct in6_addr * |
| 560 | nd6_llinfo_get_holdsrc(struct llentry *ln, struct in6_addr *src) |
| 561 | { |
| 562 | struct ip6_hdr hdr; |
| 563 | struct mbuf *m; |
| 564 | |
| 565 | if (ln->la_hold == NULL) |
| 566 | return (NULL); |
| 567 | |
| 568 | /* |
| 569 | * assume every packet in la_hold has the same IP header |
| 570 | */ |
| 571 | m = ln->la_hold; |
| 572 | if (sizeof(hdr) > m->m_len) |
| 573 | return (NULL); |
| 574 | |
| 575 | m_copydata(m, 0, sizeof(hdr), (caddr_t)&hdr); |
| 576 | *src = hdr.ip6_src; |
| 577 | |
| 578 | return (src); |
| 579 | } |
| 580 | |
| 581 | /* |
| 582 | * Checks if we need to switch from STALE state. |
no test coverage detected