()
| 549 | |
| 550 | #[test] |
| 551 | fn test_internal_ip_cgnat() { |
| 552 | // 100.64.0.0/10 — CGNAT / shared address space (RFC 6598) |
| 553 | assert!(is_internal_ip(IpAddr::V4(Ipv4Addr::new(100, 64, 0, 1)))); |
| 554 | assert!(is_internal_ip(IpAddr::V4(Ipv4Addr::new(100, 100, 50, 3)))); |
| 555 | assert!(is_internal_ip(IpAddr::V4(Ipv4Addr::new( |
| 556 | 100, 127, 255, 255 |
| 557 | )))); |
| 558 | // Just outside the /10 boundary |
| 559 | assert!(!is_internal_ip(IpAddr::V4(Ipv4Addr::new(100, 128, 0, 1)))); |
| 560 | assert!(!is_internal_ip(IpAddr::V4(Ipv4Addr::new( |
| 561 | 100, 63, 255, 255 |
| 562 | )))); |
| 563 | } |
| 564 | |
| 565 | #[test] |
| 566 | fn test_internal_ip_special_use_ranges() { |
nothing calls this directly
no outgoing calls
no test coverage detected