1f092caba7
Add comments and revert logic changes in 01_fallback_counting Remove quotes when reading ID value from /etc/os-release Related: rhbz#1650706 blscfg: expand grub_users before passing to grub_normal_add_menu_entry() Resolves: rhbz#1650706 Drop buggy downstream patch "efinet: retransmit if our device is busy" Resolves: rhbz#1649048 Make the menu entry users option argument to be optional Related: rhbz#1652434 10_linux_bls: add missing menu entries options Resolves: rhbz#1652434 Drop "Be more aggro about actually using the *configured* network device." Resolves: rhbz#1654388 Fix menu entry selection based on title Resolves: rhbz#1654936 Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
60 lines
2.2 KiB
Diff
60 lines
2.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: RHEL Ninjas <example@example.com>
|
|
Date: Fri, 25 Sep 2015 16:24:23 +0900
|
|
Subject: [PATCH] efinet: add filter for the first exclusive reopen of SNP
|
|
|
|
---
|
|
grub-core/net/drivers/efi/efinet.c | 39 ++++++++++++++++++++++++++++++++++++++
|
|
1 file changed, 39 insertions(+)
|
|
|
|
diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
|
|
index 5388f952ba9..d15a799f29a 100644
|
|
--- a/grub-core/net/drivers/efi/efinet.c
|
|
+++ b/grub-core/net/drivers/efi/efinet.c
|
|
@@ -383,6 +383,45 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
|
&pxe_mode->dhcp_ack,
|
|
sizeof (pxe_mode->dhcp_ack),
|
|
1, device, path);
|
|
+ net = grub_efi_open_protocol (card->efi_handle, &net_io_guid,
|
|
+ GRUB_EFI_OPEN_PROTOCOL_BY_EXCLUSIVE);
|
|
+ if (net) {
|
|
+ if (net->mode->state == GRUB_EFI_NETWORK_STOPPED
|
|
+ && efi_call_1 (net->start, net) != GRUB_EFI_SUCCESS)
|
|
+ continue;
|
|
+
|
|
+ if (net->mode->state == GRUB_EFI_NETWORK_STOPPED)
|
|
+ continue;
|
|
+
|
|
+ if (net->mode->state == GRUB_EFI_NETWORK_STARTED
|
|
+ && efi_call_3 (net->initialize, net, 0, 0) != GRUB_EFI_SUCCESS)
|
|
+ continue;
|
|
+
|
|
+ /* Enable hardware receive filters if driver declares support for it.
|
|
+ We need unicast and broadcast and additionaly all nodes and
|
|
+ solicited multicast for IPv6. Solicited multicast is per-IPv6
|
|
+ address and we currently do not have API to do it so simply
|
|
+ try to enable receive of all multicast packets or evertyhing in
|
|
+ the worst case (i386 PXE driver always enables promiscuous too).
|
|
+
|
|
+ This does trust firmware to do what it claims to do.
|
|
+ */
|
|
+ if (net->mode->receive_filter_mask)
|
|
+ {
|
|
+ grub_uint32_t filters = GRUB_EFI_SIMPLE_NETWORK_RECEIVE_UNICAST |
|
|
+ GRUB_EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST |
|
|
+ GRUB_EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST;
|
|
+
|
|
+ filters &= net->mode->receive_filter_mask;
|
|
+ if (!(filters & GRUB_EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST))
|
|
+ filters |= (net->mode->receive_filter_mask &
|
|
+ GRUB_EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS);
|
|
+
|
|
+ efi_call_6 (net->receive_filters, net, filters, 0, 0, 0, NULL);
|
|
+ }
|
|
+
|
|
+ card->efi_net = net;
|
|
+ }
|
|
return;
|
|
}
|
|
}
|