Commit d170acb
committed
Fix IPFamilyOf to notice bad *net.IPNets
A manually-constructed IPNet could have a Mask that doesn't match its
IP (in which case .String() would return "<nil>" and .Contains() would
always return false). So treat that as IPFamilyUnknown.1 parent df38949 commit d170acb
2 files changed
+9
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
122 | 128 | | |
123 | | - | |
| 129 | + | |
124 | 130 | | |
125 | 131 | | |
126 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
669 | 669 | | |
670 | 670 | | |
671 | 671 | | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | 672 | | |
676 | 673 | | |
677 | 674 | | |
678 | 675 | | |
679 | 676 | | |
680 | 677 | | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | 678 | | |
685 | 679 | | |
686 | 680 | | |
| |||
702 | 696 | | |
703 | 697 | | |
704 | 698 | | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | 699 | | |
709 | 700 | | |
710 | 701 | | |
711 | 702 | | |
712 | 703 | | |
713 | 704 | | |
714 | 705 | | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | 706 | | |
719 | 707 | | |
720 | 708 | | |
| |||
0 commit comments