|
|
a85e8e |
From 3f83a59f17fef591cf5e4804f6b26ca9a9c1fe35 Mon Sep 17 00:00:00 2001
|
|
|
a85e8e |
From: RHEL Ninjas <example@example.com>
|
|
|
a85e8e |
Date: Fri, 25 Sep 2015 16:24:23 +0900
|
|
|
a85e8e |
Subject: [PATCH 184/260] efinet: add filter for the first exclusive reopen of
|
|
|
a85e8e |
SNP
|
|
|
a85e8e |
|
|
|
a85e8e |
---
|
|
|
a85e8e |
grub-core/net/drivers/efi/efinet.c | 24 ++++++++++++++++++++++++
|
|
|
a85e8e |
1 file changed, 24 insertions(+)
|
|
|
a85e8e |
|
|
|
a85e8e |
diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
|
|
|
a85e8e |
index c3a128cd1..d8099a598 100644
|
|
|
a85e8e |
--- a/grub-core/net/drivers/efi/efinet.c
|
|
|
a85e8e |
+++ b/grub-core/net/drivers/efi/efinet.c
|
|
|
a85e8e |
@@ -407,6 +407,30 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
|
|
a85e8e |
if (net->mode->state == GRUB_EFI_NETWORK_STARTED
|
|
|
a85e8e |
&& efi_call_3 (net->initialize, net, 0, 0) != GRUB_EFI_SUCCESS)
|
|
|
a85e8e |
continue;
|
|
|
a85e8e |
+
|
|
|
a85e8e |
+ /* Enable hardware receive filters if driver declares support for it.
|
|
|
a85e8e |
+ We need unicast and broadcast and additionaly all nodes and
|
|
|
a85e8e |
+ solicited multicast for IPv6. Solicited multicast is per-IPv6
|
|
|
a85e8e |
+ address and we currently do not have API to do it so simply
|
|
|
a85e8e |
+ try to enable receive of all multicast packets or evertyhing in
|
|
|
a85e8e |
+ the worst case (i386 PXE driver always enables promiscuous too).
|
|
|
a85e8e |
+
|
|
|
a85e8e |
+ This does trust firmware to do what it claims to do.
|
|
|
a85e8e |
+ */
|
|
|
a85e8e |
+ if (net->mode->receive_filter_mask)
|
|
|
a85e8e |
+ {
|
|
|
a85e8e |
+ grub_uint32_t filters = GRUB_EFI_SIMPLE_NETWORK_RECEIVE_UNICAST |
|
|
|
a85e8e |
+ GRUB_EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST |
|
|
|
a85e8e |
+ GRUB_EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST;
|
|
|
a85e8e |
+
|
|
|
a85e8e |
+ filters &= net->mode->receive_filter_mask;
|
|
|
a85e8e |
+ if (!(filters & GRUB_EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST))
|
|
|
a85e8e |
+ filters |= (net->mode->receive_filter_mask &
|
|
|
a85e8e |
+ GRUB_EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS);
|
|
|
a85e8e |
+
|
|
|
a85e8e |
+ efi_call_6 (net->receive_filters, net, filters, 0, 0, 0, NULL);
|
|
|
a85e8e |
+ }
|
|
|
a85e8e |
+
|
|
|
a85e8e |
card->efi_net = net;
|
|
|
a85e8e |
}
|
|
|
a85e8e |
return;
|
|
|
a85e8e |
--
|
|
|
a85e8e |
2.13.0
|
|
|
a85e8e |
|