The (undocumented) VMBus protocol seems to allow for transfer page-based packets where the data payload is split into an arbitrary set of ranges within the transfer page set. The RNDIS protocol includes a length field within the header of each message, and it is known from observation that multiple RNDIS messages can be concatenated into a single VMBus message. iPXE currently assumes that the transfer page range boundaries are entirely arbitrary, and uses the RNDIS header length to determine the RNDIS message boundaries. Windows Server 2012 R2 generates an RNDIS_INDICATE_STATUS_MSG for an undocumented and unknown status code (0x40020006) with a malformed RNDIS header length: the length does not cover the StatusBuffer portion of the message. This causes iPXE to report a malformed RNDIS message and to discard any further RNDIS messages within the same VMBus message. The Linux Hyper-V driver assumes that the transfer page range boundaries correspond to RNDIS message boundaries, and so does not notice the malformed length field in the RNDIS header. Match the behaviour of the Linux Hyper-V driver: assume that the transfer page range boundaries correspond to the RNDIS message boundaries and ignore the RNDIS header length. This avoids triggering the "malformed packet" error and also avoids unnecessary data copying: since we now have one I/O buffer per RNDIS message, there is no longer any need to use iob_split(). Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
||
298 | 298 |
|
299 | 299 |
|
300 | 300 |
|
301 |
|
|
301 |
|
|
302 | 302 |
|
303 | 303 |
|
304 | 304 |
|
305 | 305 |
|
306 |
|
|
306 |
|
|
307 | 307 |
|
308 | 308 |
|
309 | 309 |
|
310 |
|
|
311 |
|
|
310 | 312 |
|
311 | 313 |
|
312 | 314 |
|
|
||
324 | 326 |
|
325 | 327 |
|
326 | 328 |
|
327 |
|
|
329 |
|
|
328 | 330 |
|
329 | 331 |
|
330 | 332 |
|
331 | 333 |
|
332 | 334 |
|
333 | 335 |
|
334 |
|
|
335 |
|
|
336 |
|
|
337 |
|
|
338 |
|
|
339 |
|
|
340 |
|
|
336 | 341 |
|
337 | 342 |
|
338 | 343 |
|
339 | 344 |
|
340 | 345 |
|
341 |
|
|
346 |
|
|
347 |
|
|
348 |
|
|
349 |
|
|
342 | 350 |
|
343 | 351 |
|
344 | 352 |
|
|
||
403 | 403 |
|
404 | 404 |
|
405 | 405 |
|
406 |
|
|
406 |
|
|
407 | 407 |
|
408 | 408 |
|
409 | 409 |
|
410 | 410 |
|
411 | 411 |
|
412 |
|
|
413 |
|
|
414 |
|
|
415 |
|
|
416 |
|
|
417 | 412 |
|
418 | 413 |
|
419 | 414 |
|
420 |
|
|
415 |
|
|
421 | 416 |
|
422 | 417 |
|
423 | 418 |
|
|
||
807 | 807 |
|
808 | 808 |
|
809 | 809 |
|
810 |
|
|
810 |
|
|
811 | 811 |
|
812 | 812 |
|
813 | 813 |
|
814 |
|
|
814 |
|
|
815 |
|
|
815 | 816 |
|
816 |
|
|
817 |
|
|
818 |
|
|
817 |
|
|
818 |
|
|
819 |
|
|
819 | 820 |
|
820 | 821 |
|
821 | 822 |
|
822 | 823 |
|
823 |
|
|
824 |
|
|
824 | 825 |
|
825 | 826 |
|
826 | 827 |
|
|
||
832 | 833 |
|
833 | 834 |
|
834 | 835 |
|
835 |
|
|
836 |
|
|
837 |
|
|
836 | 838 |
|
837 |
|
|
838 |
|
|
839 |
|
|
840 |
|
|
841 |
|
|
842 |
|
|
843 | 839 |
|
844 | 840 |
|
845 |
|
|
846 |
|
|
847 |
|
|
848 |
|
|
849 |
|
|
850 |
|
|
851 |
|
|
852 |
|
|
853 |
|
|
841 |
|
|
842 |
|
|
854 | 843 |
|
844 |
|
|
845 |
|
|
855 | 846 |
|
856 | 847 |
|
848 |
|
|
849 |
|
|
850 |
|
|
851 |
|
|
852 |
|
|
853 |
|
|
854 |
|
|
855 |
|
|
856 |
|
|
857 |
|
|
858 |
|
|
859 |
|
|
860 |
|
|
861 |
|
|
857 | 862 |
|
858 | 863 |
|
859 | 864 |
|
|
||
863 | 868 |
|
864 | 869 |
|
865 | 870 |
|
866 |
|
|
871 |
|
|
867 | 872 |
|
868 | 873 |
|
869 |
|
|
870 | 874 |
|
875 |
|
|
876 |
|
|
877 |
|
|
878 |
|
|
871 | 879 |
|
872 |
|
|
880 |
|
|
873 | 881 |
|
874 | 882 |
|
875 | 883 |
|
|
||
880 | 888 |
|
881 | 889 |
|
882 | 890 |
|
883 |
|
|
891 |
|
|
884 | 892 |
|
885 | 893 |
|
886 | 894 |
|
|
||
929 | 937 |
|
930 | 938 |
|
931 | 939 |
|
940 |
|
|
941 |
|
|
942 |
|
|
943 |
|
|
944 |
|
|
945 |
|
|
946 |
|
|
947 |
|
|
932 | 948 |
|
933 | 949 |
|
934 | 950 |
|
|
||
948 | 964 |
|
949 | 965 |
|
950 | 966 |
|
951 |
|
|
952 |
|
|
953 |
|
|
954 |
|
|
955 | 967 |
|
956 |
|
|
968 |
|
|
957 | 969 |
|
958 | 970 |
|
959 | 971 |
|
|
||
759 | 759 |
|
760 | 760 |
|
761 | 761 |
|
762 |
|
|
762 |
|
|
763 | 763 |
|
764 | 764 |
|
765 | 765 |
|
766 | 766 |
|
767 |
|
|
768 |
|
|
769 | 767 |
|
770 | 768 |
|
771 | 769 |
|
772 |
|
|
773 |
|
|
774 |
|
|
775 |
|
|
776 |
|
|
770 |
|
|
771 |
|
|
772 |
|
|
773 |
|
|
774 |
|
|
775 |
|
|
777 | 776 |
|
778 | 777 |
|
778 |
|
|
779 | 779 |
|
780 |
|
|
781 |
|
|
782 |
|
|
783 |
|
|
784 |
|
|
785 |
|
|
786 |
|
|
787 |
|
|
788 |
|
|
789 |
|
|
790 |
|
|
791 |
|
|
792 |
|
|
793 |
|
|
794 |
|
|
795 |
|
|
796 |
|
|
797 |
|
|
798 |
|
|
799 |
|
|
800 |
|
|
801 |
|
|
802 |
|
|
803 |
|
|
804 |
|
|
805 |
|
|
806 |
|
|
807 |
|
|
808 |
|
|
809 |
|
|
810 |
|
|
811 |
|
|
812 |
|
|
813 |
|
|
814 |
|
|
815 |
|
|
816 |
|
|
817 |
|
|
818 |
|
|
780 |
|
|
781 |
|
|
782 |
|
|
819 | 783 |
|
820 |
|
|
821 |
|
|
822 |
|
|
784 |
|
|
785 |
|
|
823 | 786 |
|
824 | 787 |
|
825 | 788 |
|