| 584 | } |
| 585 | |
| 586 | static int |
| 587 | stf_checkaddr6(struct stf_softc *sc, struct in6_addr *in6, struct ifnet *inifp) |
| 588 | { |
| 589 | /* |
| 590 | * check 6to4 addresses |
| 591 | */ |
| 592 | if (IN6_IS_ADDR_6TO4(in6)) { |
| 593 | struct in_addr in4; |
| 594 | bcopy(GET_V4(in6), &in4, sizeof(in4)); |
| 595 | return stf_checkaddr4(sc, &in4, inifp); |
| 596 | } |
| 597 | |
| 598 | /* |
| 599 | * reject anything that look suspicious. the test is implemented |
| 600 | * in ip6_input too, but we check here as well to |
| 601 | * (1) reject bad packets earlier, and |
| 602 | * (2) to be safe against future ip6_input change. |
| 603 | */ |
| 604 | if (IN6_IS_ADDR_V4COMPAT(in6) || IN6_IS_ADDR_V4MAPPED(in6)) |
| 605 | return -1; |
| 606 | |
| 607 | return 0; |
| 608 | } |
| 609 | |
| 610 | static int |
| 611 | in_stf_input(struct mbuf *m, int off, int proto, void *arg) |
no test coverage detected