Browse Source

[pxe] Set correct PktType in PXENV_UNDI_ISR

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 14 years ago
parent
commit
f8a82c7d23
1 changed files with 9 additions and 1 deletions
  1. 9
    1
      src/arch/i386/interface/pxe/pxe_undi.c

+ 9
- 1
src/arch/i386/interface/pxe/pxe_undi.c View File

@@ -785,7 +785,15 @@ PXENV_EXIT_t pxenv_undi_isr ( struct s_PXENV_UNDI_ISR *undi_isr ) {
785 785
 		undi_isr->Frame.segment = rm_ds;
786 786
 		undi_isr->Frame.offset = __from_data16 ( basemem_packet );
787 787
 		undi_isr->ProtType = prottype;
788
-		undi_isr->PktType = XMT_DESTADDR;
788
+		if ( memcmp ( ll_dest, pxe_netdev->ll_addr,
789
+			      ll_protocol->ll_addr_len ) == 0 ) {
790
+			undi_isr->PktType = P_DIRECTED;
791
+		} else if ( memcmp ( ll_dest, pxe_netdev->ll_broadcast,
792
+				     ll_protocol->ll_addr_len ) == 0 ) {
793
+			undi_isr->PktType = P_BROADCAST;
794
+		} else {
795
+			undi_isr->PktType = P_MULTICAST;
796
+		}
789 797
 		DBGC2 ( &pxenv_undi_isr, " %04x:%04x+%x(%x) %s hlen %d",
790 798
 			undi_isr->Frame.segment, undi_isr->Frame.offset,
791 799
 			undi_isr->BufferLength, undi_isr->FrameLength,

Loading…
Cancel
Save