summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2010-12-06 19:33:57 +0100
committerMichael Brown2010-12-09 14:10:35 +0100
commitf8a82c7d2300df620ef917d5b7c855d91aa0f31c (patch)
tree9d7cf6e635981af33589d71467414f00e1770083
parent[pxe] Avoid touching fields that may not exist in PXENV_UNDI_GET_NIC_TYPE (diff)
downloadipxe-f8a82c7d2300df620ef917d5b7c855d91aa0f31c.tar.gz
ipxe-f8a82c7d2300df620ef917d5b7c855d91aa0f31c.tar.xz
ipxe-f8a82c7d2300df620ef917d5b7c855d91aa0f31c.zip
[pxe] Set correct PktType in PXENV_UNDI_ISR
Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r--src/arch/i386/interface/pxe/pxe_undi.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/arch/i386/interface/pxe/pxe_undi.c b/src/arch/i386/interface/pxe/pxe_undi.c
index 687f5e8f..eb54417c 100644
--- a/src/arch/i386/interface/pxe/pxe_undi.c
+++ b/src/arch/i386/interface/pxe/pxe_undi.c
@@ -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,