]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[pxe] Set correct PktType in PXENV_UNDI_ISR
authorMichael Brown <mcb30@ipxe.org>
Mon, 6 Dec 2010 18:33:57 +0000 (18:33 +0000)
committerMichael Brown <mcb30@ipxe.org>
Thu, 9 Dec 2010 13:10:35 +0000 (13:10 +0000)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/i386/interface/pxe/pxe_undi.c

index 687f5e8f3685895d14f358d6ce0fb0a72f915406..eb54417cb5439d70c47c698c2b88c7243e994538 100644 (file)
@@ -785,7 +785,15 @@ PXENV_EXIT_t pxenv_undi_isr ( struct s_PXENV_UNDI_ISR *undi_isr ) {
                undi_isr->Frame.segment = rm_ds;
                undi_isr->Frame.offset = __from_data16 ( basemem_packet );
                undi_isr->ProtType = prottype;
-               undi_isr->PktType = XMT_DESTADDR;
+               if ( memcmp ( ll_dest, pxe_netdev->ll_addr,
+                             ll_protocol->ll_addr_len ) == 0 ) {
+                       undi_isr->PktType = P_DIRECTED;
+               } else if ( memcmp ( ll_dest, pxe_netdev->ll_broadcast,
+                                    ll_protocol->ll_addr_len ) == 0 ) {
+                       undi_isr->PktType = P_BROADCAST;
+               } else {
+                       undi_isr->PktType = P_MULTICAST;
+               }
                DBGC2 ( &pxenv_undi_isr, " %04x:%04x+%x(%x) %s hlen %d",
                        undi_isr->Frame.segment, undi_isr->Frame.offset,
                        undi_isr->BufferLength, undi_isr->FrameLength,